Proposal to deprecate and then drop fromJust

Sean Leather sean.leather at
Tue Feb 24 11:04:26 UTC 2015

On Tue, Feb 24, 2015 at 12:47 PM, Herbert Valerio Riedel wrote:

> Relatedly, I was thinking of a separate 'partial-functions' warning
> class, so we could annotate partial functions (head/last/...) in base,
> and have the associated warnings be tunable via a separate GHC -fwarn*
> flag. This could even be generalised to arbitrary warning-classes:
>  {-# WARNING[partial] fromJust "Use 'fromMaybe' instead" #-}

+1! This is better than a deprecation if there's no actual deprecation.
Also, to appease the GHCi users of `fromJust`, the warning could perhaps be
disabled for interactive use?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Libraries mailing list