[Haskell] Fixpoint combinator without recursion

Dan Weston westondan at imageworks.com
Wed Apr 4 17:57:06 EDT 2007


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 at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell
> 
> 




More information about the Haskell mailing list