
7 Mar
2003
7 Mar
'03
2:22 a.m.
I want to declare the following: class Get a where ls :: a b -> IO [b] mk :: IO [b] -> a b instance (Get a) => Functor a where fmap f x = mk (ls x >>= return . map f) But to have ghc type everything, I have to turn on "-fglasgow-exts -fallow-undecidable-instances -fallow-overlapping-instances". Is there a clean way to state that all types in my type class are also in the "Functor" type class? If not, what is the problem? Vincenzo