Skip to content
Snippets Groups Projects
Forked from Glasgow Haskell Compiler / GHC
Loading
  • Adam Gundry's avatar
    b84b91f5
    Representation-polymorphic HasField (fixes #22156) · b84b91f5
    Adam Gundry authored and Marge Bot's avatar Marge Bot committed
    This generalises the HasField class to support representation polymorphism,
    so that instead of
    
        type HasField :: forall {k} . k -> Type -> Type -> Constraint
    
    we have
    
        type HasField :: forall {k} {r_rep} {a_rep} . k -> TYPE r_rep -> TYPE a_rep -> Constraint
    b84b91f5
    History
    Representation-polymorphic HasField (fixes #22156)
    Adam Gundry authored and Marge Bot's avatar Marge Bot committed
    This generalises the HasField class to support representation polymorphism,
    so that instead of
    
        type HasField :: forall {k} . k -> Type -> Type -> Constraint
    
    we have
    
        type HasField :: forall {k} {r_rep} {a_rep} . k -> TYPE r_rep -> TYPE a_rep -> Constraint
Code owners