Proposal to deprecate and then drop fromJust

Erik de Castro Lopo mle+hs at
Tue Feb 24 09:28:28 UTC 2015

Roman Cheplyaka wrote:

> Say I have
>   parse :: String -> Maybe Value
>   process :: Value -> IO ()
> Then (process . fromJust . parse) is the fastest way to compose the two.


     process fromMaybe defaultValue . parse

do as well?

> So I'm -1 on dropping fromJust, but I don't object to adding a
> deprecation warning to it.


> Then again, why aren't we doing the same to head&tail?

I'd be very much in favour of that and would also add init and
last. However, these are pretty easy to avoid with a custom prelude
and the NoImplicitPrelude pragma.

Erik de Castro Lopo

More information about the Libraries mailing list