[Hugs-users] Pattern match failure leads to lots of output

Neil Mitchell ndmitchell at gmail.com
Fri Sep 1 12:41:44 EDT 2006


Hi

> It would probably be better to hide the dictionary arguments and the _vNNN
> suffixes altogether in pattern match errors.  Can you put a boiled-down
> example in the BTS?

Here is a small failing example, with context and stuff its hard to
know when I get it minimal:

> data Maybe1 a = Just1 a | Nothing1 deriving Eq
> data Maybe2 a = Just2 (Maybe1 a) | Nothing2 deriving Eq
> crash_me = g (Just2 (Just1 1))
> g x = f Nothing2
>     where f y | x == y && False = undefined

Run crash_me to see a lot of output.

Ross: I can't test the code you sent me right now, since I'm on a
machine without a C compiler, but should be back by Wednesday.

Thanks

Neil


More information about the Hugs-Users mailing list