On Wed, 23 Jun 2004, Adrian Hey wrote: > I think all occurences of [] have type forall a. [a] > The case expression.. > case a of > (a':as) -> <expr1> > [] -> <expr2> > > Should be typed as if written.. > case a of > (a':as) -> let a=(a':as) in <expr1> > [] -> let a=[] in <expr2> >
How about when a is an expression rather than just an identifier? I'm playing around with a subtyping extension to plain ol' H-M at the moment, my solution there's to let the user use an as-pattern to capture the extra type info where needed. -- [EMAIL PROTECTED] _______________________________________________ Haskell-Cafe mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell-cafe