Skip to content
Snippets Groups Projects
Forked from Glasgow Haskell Compiler / GHC
Source project has a limited visibility.
  • sheaf's avatar
    23f95735
    Docs: datacon eta-expansion, rep-poly checks · 23f95735
    sheaf authored and Marge Bot's avatar Marge Bot committed
    The existing notes weren't very clear on how the eta-expansion of
    data constructors that occurs in tcInferDataCon/dsConLike interacts
    with the representation polymorphism invariants. So we explain with
    a few more details how we ensure that the representation-polymorphic
    lambdas introduced by tcInferDataCon/dsConLike don't end up causing
    problems, by checking they are properly instantiated and then relying
    on the simple optimiser to perform beta reduction.
    
    A few additional changes:
    
      - ConLikeTc just take type variables instead of binders, as we
        never actually used the binders.
      - Removed the FRRApp constructor of FRROrigin; it was no longer used
        now that we use ExpectedFunTyOrigin.
      - Adds a bit of documentation to the constructors
        of ExpectedFunTyOrigin.
    23f95735
    History
    Docs: datacon eta-expansion, rep-poly checks
    sheaf authored and Marge Bot's avatar Marge Bot committed
    The existing notes weren't very clear on how the eta-expansion of
    data constructors that occurs in tcInferDataCon/dsConLike interacts
    with the representation polymorphism invariants. So we explain with
    a few more details how we ensure that the representation-polymorphic
    lambdas introduced by tcInferDataCon/dsConLike don't end up causing
    problems, by checking they are properly instantiated and then relying
    on the simple optimiser to perform beta reduction.
    
    A few additional changes:
    
      - ConLikeTc just take type variables instead of binders, as we
        never actually used the binders.
      - Removed the FRRApp constructor of FRROrigin; it was no longer used
        now that we use ExpectedFunTyOrigin.
      - Adds a bit of documentation to the constructors
        of ExpectedFunTyOrigin.
Code owners
Assign users and groups as approvers for specific file changes. Learn more.