
8 Aug
2005
8 Aug
'05
5:17 p.m.
In ghc 6.4 (fine work - many gratulations to all who did it!) it is permitted to have type parameters which are reachable (7.4.3.1 context of type signatures). I tried the following: module TypeDependencies where class A a b | a -> b class (A a b) => B b where op :: a -> a x :: A a b => a -> a x = id Which compiles fine for the function x, but does complain "not in scope: type variable 'a' " for the class (A a b) => B b. Is this an intentional restriction that 'reachable' type variables are only permitted in type definitions, but not in classes? or do I misunderstand something? Any help appreciated! Andrew Frank