
24 Feb
2015
24 Feb
'15
11:04 a.m.
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