Skip to content
  • Simon Peyton Jones's avatar
    Two small further extensions to associated types · c27df60d
    Simon Peyton Jones authored
    a) Allow multiple AT decls for in a single instance
    b) Allow a free type parameter to be instantiated
    
    Example   class C a where
                type T a x :: *
    
    	  data A
              data B
              instance C Int where
                type T Int A = Int
                type T Int B = Bool
    
    There is no reason to prohibit this, and as we move
    towards a proper kind system it may even be useful.
    
    I also updated the documentation to cover this change
    and the previous one of allowing free type parameters
    for associated families.
    c27df60d