Skip to content

Commit

Permalink
fix implementation of readMaybe'
Browse files Browse the repository at this point in the history
  • Loading branch information
pa-ba committed Oct 24, 2024
1 parent fc5b676 commit 69e4b46
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/WidgetRattus/Strict.hs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ import WidgetRattus.Derive
import WidgetRattus.Plugin.Annotation
import GHC.Exts (IsList(..))
import Data.Text hiding (foldl, singleton)
import Text.Read (readMaybe)

infixr 2 :*
-- | Strict pair type.
Expand Down Expand Up @@ -266,7 +267,7 @@ toText x = pack (show x)

{-# ANN readMaybe' AllowLazyData #-}
readMaybe' :: Read a => Text -> Maybe' a
readMaybe' x = case read (unpack x) of
readMaybe' x = case readMaybe (unpack x) of
Just x -> Just' x
Nothing -> Nothing'

Expand Down

0 comments on commit 69e4b46

Please sign in to comment.