instance declaration troubles

Nick Name nick.name@inwind.it
Fri, 7 Mar 2003 03:22:38 +0100


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