--- Matt Fairtlough <[EMAIL PROTECTED]> wrote: > instance (Eq a, Testit a) => Super (Test a) where > sup1 (Test{f1=x, f2=y}) = Just Test{f1=x, f2=y} > where > y' = top y > x' = top x > top :: [a] -> a > top (s:st) = s > > is it possible to compile this program in > ghc-5.02.3?
Maybe if top:: [a] -> a became top:: [b] -> b See your /user-guide/scoped-type-variables.html and you will find the sentence (or something like it) "The type variables in the head of a class or instance declaration scope over the methods defined in the where part." So, you are not the only one to have had this confusion with the differences of behavior in ghc vs hugs! see http://haskell.org/pipermail/glasgow-haskell-bugs/2002-April/002308.html Jay Cox __________________________________________________ Do You Yahoo!? Yahoo! - Official partner of 2002 FIFA World Cup http://fifaworldcup.yahoo.com _______________________________________________ Glasgow-haskell-users mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-users