[Haskell-cafe] Declaring each instance of a typeclass to be also an instance of another typeclass

Mikhail Glushenkov the.dead.shall.rise at gmail.com
Sun Jan 11 08:12:02 EST 2009


Is it possible to write something like this:

> {-# LANGUAGE FlexibleInstances, UndecidableInstances #-}
> import Control.Monad (liftM)
> instance (Monad a) => Functor a where
>     fmap = liftM

without having to use UndecidableInstances (and preferably, other type system
extensions too)?

More information about the Haskell-Cafe mailing list