summaryrefslogtreecommitdiff
path: root/src/Utility/PartialPrelude.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Utility/PartialPrelude.hs')
-rw-r--r--src/Utility/PartialPrelude.hs8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/Utility/PartialPrelude.hs b/src/Utility/PartialPrelude.hs
index 47e98318..85f80534 100644
--- a/src/Utility/PartialPrelude.hs
+++ b/src/Utility/PartialPrelude.hs
@@ -38,11 +38,9 @@ last = Prelude.last
{- Attempts to read a value from a String.
-
- - Ignores leading/trailing whitespace, and throws away any trailing
- - text after the part that can be read.
- -
- - readMaybe is available in Text.Read in new versions of GHC,
- - but that one requires the entire string to be consumed.
+ - Unlike Text.Read.readMaybe, this ignores some trailing text
+ - after the part that can be read. However, if the trailing text looks
+ - like another readable value, it fails.
-}
readish :: Read a => String -> Maybe a
readish s = case reads s of