MonadFail proposal (MFP): Moving fail out of Monad

David Luposchainsky dluposchainsky at
Mon Jun 15 18:18:33 UTC 2015

On 11.06.2015 18:20, Dan Doel wrote:
> I believe a pattern is classified as unfailable there if it is irrefutable or 
> refutable only by bottom. Which of course is the distinction here, (x,y) is 
> unfailable, but not irrefutable.

Some of the confusion may be because GHC has a function "isIrrefutableHsPat" that
seems to check whether a pattern is irrefutable by your definition. The source
comment talks about naming a bit:

> (isIrrefutableHsPat p) is true if matching against p cannot fail,
> in the sense of falling through to the next pattern.
>      (NB: this is not quite the same as the (silly) defn
>      in 3.17.2 of the Haskell 98 report.)


(Time for a PatternUnfallthroughableProposal?)


More information about the ghc-devs mailing list