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
_______________________________________________
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to