That doesn't help in any sense, my problem is that I need to use the class
method, but I take the context from granted, but the compiler still needs a
"general" instance for any functor f.
hugo
___
Haskell mailing list
Haskell@haskell.org
http://www.hask
2007/6/22, Hugo Pacheco <[EMAIL PROTECTED]>:
class Functor f => C f a b | f a -> b where
ftest :: f a -> b
I want to write some function
test :: (C f a b) => (a -> b)
test = ftest . undefined
I'm not sure whether this is what you want, but the "obvious" way to
make this type-check would se
Hi,
I have a set of functor definitions with corresponding instances
newtype Id a = Ident {unIdent :: a} deriving Eq
newtype K b a = Const {unConst :: b} deriving Eq
instance Functor Id where
fmap f (Ident x) = Ident $ f x
instance Functor (K a) where
fmap f (Const x) = Const x