Proposal to deprecate and then drop fromJust

Sean Leather sean.leather at gmail.com
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?

Regards,
Sean
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/libraries/attachments/20150224/75f8b520/attachment.html>


More information about the Libraries mailing list