Looking at the text package, I see a module called Data.Text.Read. It seems to work:
λ> decimal (T.pack "99 bottles")
Right (99," bottles")
λ> decimal (T.pack "a digit")
Left "input does not start with a digit"
Looking at the text package, I see a module called Data.Text.Read. It seems to work:
λ> decimal (T.pack "99 bottles")
Right (99," bottles")
λ> decimal (T.pack "a digit")
Left "input does not start with a digit"