[prev in list] [next in list] [prev in thread] [next in thread]
List: haskell-beginners
Subject: Re: [Haskell-beginners] =?utf-8?q?How_to_avoid_repeating_a=09type=09r?=
From: gs <voldermort () hotmail ! com>
Date: 2013-04-25 8:03:25
Message-ID: loom.20130425T095448-755 () post ! gmane ! org
[Download RAW message or body]
Daniel Fischer <daniel.is.fischer <at> googlemail.com> writes:
> ...
You've mentioned GADT a few times, but I can't find a case where it's
different to regular datatypes.
data Foo a = Eq a => Foo a
seems to have the same effect as
data Foo a where
Foo a :: Eq a => a -> Foo a
Both remember the Eq constraint if I pattern match on the constructor, and
both ignore it otherwise.
_______________________________________________
Beginners mailing list
Beginners@haskell.org
http://www.haskell.org/mailman/listinfo/beginners
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic