Proposal: Add readMaybe (and possibly readEither) to Prelude, make Haddocks for read more cautionary

Phil Ruffwind rf at rufflewind.com
Thu Jan 5 14:01:24 UTC 2017


Rather than deprecating a function, it would be nice to have some sort
of {-# PARTIAL #-} pragma to warn the user that 'read' is a partial
function (and similarly for 'head', 'tail' and its friends), much like
how GHC already warns about partial case-blocks.  That being said, it's
probably best to delay this until there is a way to explicitly turn of
the warnings individually at the call site for those who want
warning-free code.


More information about the Libraries mailing list