21 Dec
                
                    2011
                
            
            
                21 Dec
                
                '11
                
            
            
            
        
    
                7:58 p.m.
            
        Quoting Bas van Dijk 
I'm playing a bit with the new ConstraintKinds feature in GHC 7.4.1-rc1. I'm trying to give the Functor class an associated constraint so that we can make Set an instance of Functor. The following code works but I wonder if the trick with: class Empty a; instance Empty a, is the recommended way to do this:
Maybe something like this? class Functor f where type C f a :: Constraint type C f a = () instance Functor Set where type C Set a = Ord a ~d