Proposal to deprecate and then drop fromJust

Bardur Arantsson spam at
Tue Feb 24 06:13:28 UTC 2015

On 24-02-2015 06:42, Erik de Castro Lopo wrote:
> Hi all,
> We currently have in the Data.Maybe module from base:
>      fromJust :: Maybe a -> a
> which newbies often find using hoogle or other search tools and is
> a huge trap. *Every* usage of the above can be replaced by using
>       fromMaybe :: a -> Maybe a -> a
> which forces the user to provide a default value for the case where
> the Maybe a is a Nothing.
> The idea would be to deprecate fromMaybe for 7.12 and remove it
> completely later.
> Comments?

How much code on Hackage is currently using fromJust? (A rough estimate
by group would probably be sufficient.)


More information about the Libraries mailing list