
7 Jun
2012
7 Jun
'12
7:42 a.m.
Hi cafe! The ConstraintKinds extension makes it possible to create classes of classes, like this: class F c where cfmap :: c f => (a -> b) -> f a -> f b instance F Functor where cfmap = fmap instance F Monad where cfmap = liftM So, basically we are saying that "c" is a class that has some special properties. Is it possible to express the property "c is a subclass of a specific class d"? Like class F c where Functor f => c f