What is it called if it's both? Is this even legal in Haskell? It seems
as though this would not be a grounded type, going on forever in both
directions.
Dan
Stefan O'Rear wrote:
On Wed, Apr 04, 2007 at 01:36:18PM -0700, Michael Vanier wrote:
For those of us who aren't type theorists: What's a "negative datatype"?
Negative isn't the usual term; we mostly call them 'contravariantly
recursive' data types, due to CT influence. Anyways the thing to note
is that the value appears recursively, on the left of an arrow.
data Foo = Foo (Foo -> Bool) -- contravariantly recursive
data Foo = Foo (Bool -> Foo) -- covariantly recursive
Stefan
_______________________________________________
Haskell mailing list
Haskell@haskell.org
http://www.haskell.org/mailman/listinfo/haskell
_______________________________________________
Haskell mailing list
Haskell@haskell.org
http://www.haskell.org/mailman/listinfo/haskell