This commit is contained in:
Nathan Dwarshuis 2023-02-13 18:49:41 -05:00
parent 16024c1e75
commit d2c7c0484a
1 changed files with 2 additions and 2 deletions

View File

@ -252,8 +252,8 @@ parseRational (pat, re) s = case matchGroupsMaybe s re of
_ -> msg "malformed decimal" _ -> msg "malformed decimal"
where where
readT what t = case readMaybe $ T.unpack t of readT what t = case readMaybe $ T.unpack t of
Just d -> return d Just d -> return $ fromInteger d
_ -> msg $ T.unwords ["could not parse", what, t] _ -> msg $ T.unwords ["could not parse", what, singleQuote t]
msg :: MonadFail m => T.Text -> m a msg :: MonadFail m => T.Text -> m a
msg m = msg m =
fail $ fail $