summaryrefslogtreecommitdiff
path: root/src/Utility/PartialPrelude.hs
diff options
context:
space:
mode:
authorJoey Hess2019-01-18 12:08:34 -0400
committerJoey Hess2019-01-18 12:08:34 -0400
commit876458adbc41a94c06d68b70e8b7b27288479592 (patch)
treea04d307b7d6eb0644f51af12285742f9b2f726d5 /src/Utility/PartialPrelude.hs
parent80af78c2bbbc1684a1085225b5754f4fcda4cbcb (diff)
parentf42a71ab2653707be4fcdaf1ce0f9fff209d8f12 (diff)
Merge branch 'joeyconfig'
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