Newsgroups: fa.haskell
From: "Jim Apple" <jbapple+haskell-c...@gmail.com>
Date: Tue, 09 Jan 2007 01:52:13 UTC
Local: Mon, Jan 8 2007 8:52 pm
Subject: Re: [Haskell-cafe] Monad Set via GADT
On 1/3/07, Roberto Zunino <zun...@di.unipi.it> wrote:
> 1) Why the first version did not typececk? These are very interesting questions that I forgot about until > 2) Why the second one does? > 3) If I replace (Teq a w) with (Teq w a), as in > SM :: Ord w => Teq w a -> Set.Set w -> SetM a > then union above does not typecheck! Why? I guess the type variable > unification deriving from matching Teq is not symmetric as I expect it > to be... reminded by Haskell Weekly News. Thanks, HWN! 1) Class constraints can't be used on pattern matching. They ARE http://article.gmane.org/gmane.comp.lang.haskell.cvs.all/29458/match=... 2) The second one works because Class constraints can be used when 3) I imagine this might have something to do with the coercions that #3 is just a guess. Jim You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||