[Haskell] Re: Syntax Q: How do you share RHS's in case expressions!?

Stefan Monnier monnier at iro.umontreal.ca
Sat Oct 23 11:36:02 EDT 2004

> I'm baffled that I can't find anywhere in the documentation how to associate
> two or more patterns with the same right-hand-side...

It gets more interesting with things like:

   case x of ( ([],a) | (a,[]) ) -> .. a ..

where the rewrite looks like:

   let foo a = ...
   in case x of ([],a) -> foo a; (a,[]) -> foo a



More information about the Haskell mailing list