
16 Feb
2006
16 Feb
'06
8:52 a.m.
I want to define a type for a function that returns its own type... type F a = a -> (F a,a) But the compiler gives me an error: "Cycle in type synonym declaration: ...". Why is this a restriction? Of course I can create a user defined type, but then I need an extra mechanism to call the embedded function: data F a = F (a -> (F a ,a)) call :: F a -> a -> (F a, a) call (F f) a = f a -Tom