[Haskell-beginners] Custom type classes

Imants Cekusins imantc at gmail.com
Wed Jan 27 10:11:22 UTC 2016


> `fmap` types mean that `a` should be anything, and not something
constrained.

just wondering: is it something specific to Functor class or does this
hold for any class declaration:

(a -> b)
is not the same as
... a => (a -> b)


in other words, if class expects (a -> b) with any a, instance must
not constrain a.

as opposed to

... a => a -> b
which seems ok


More information about the Beginners mailing list