18 Jan
2002
18 Jan
'02
8:01 p.m.
Suppose I have the following definition: class MyClass f a | a -> f, f -> a where ... I want to write a data type: data (MyClass f a) => MyData f = MyData (f, a) But this doesn't seem to be valid because "a" isn't in scope. But a is uniquely determined by f. What gives? Furthermore, I can't even write: data (MyClass f a) => MyData2 f = MyData2 f This makes no sense to me whatsoever. This problem can the thwarted by moving the contraint to only the function definitions, but for MyData itself, it's really a hassle. Please could someone explain what's going on? -- Hal Daume III "Computer science is no more about computers | hdaume@isi.edu than astronomy is about telescopes." -Dijkstra | www.isi.edu/~hdaume
8988
Age (days ago)
8988
Last active (days ago)
0 comments
1 participants
participants (1)
-
Hal Daume III