broken Monad Either instance?

Jake McArthur jake.mcarthur at gmail.com
Mon Nov 28 23:32:11 CET 2011


On Mon, Nov 28, 2011 at 2:47 PM, Bas van Dijk <v.dijk.bas at gmail.com> wrote:
> 4) Only give do-expressions with pattern bindings with uncomplete
> patterns a MonadFail constraint.
>
> To me 2, 3 and 4 seem fishy. I like 1 a lot but I'm unsure how many
> programs will break because of it.

Number 4 is the one I had in mind. The basic rule would be that if the
pattern is refutable (that is, not irrefutable as defined by section
3.17.2 in the Haskell 2010 report) then MonadFail is required.

- Jake



More information about the Libraries mailing list