functional dependency syntax?
Mon, 11 Nov 2002 14:50:22 +0000
I'm trying out MPTC with functional dependencies for the first time
in GHC. However, I'm not sure of the syntax. MPJ's ESOP 2000 paper
gives the following example:
class FiniteMap i e fm | fm -> (i,e) where
emptyFM :: fm
lookupFM :: i -> fm -> Maybe e
extendFM :: i -> e -> fm -> fm
but ghc (5.02.2 and 5.04.1) complain
$ ghc-5.04.1 -fglasgow-exts -c -o FunDep.o FunDep.hs
FunDep.hs:10: parse error on input `('
where the indicated line is that of the class declaration. What should
the syntax be if it is not the above?