Skip to content
Snippets Groups Projects
Forked from Glasgow Haskell Compiler / GHC
5501 commits behind the upstream repository.
  • sheaf's avatar
    7aeb6d29
    Core Lint: collect args through floatable ticks · 7aeb6d29
    sheaf authored and Marge Bot's avatar Marge Bot committed
    We were not looking through floatable ticks when collecting arguments in
    Core Lint, which caused `checkCanEtaExpand` to fail on something like:
    
    ```haskell
    reallyUnsafePtrEquality
      = \ @a ->
          (src<loc> reallyUnsafePtrEquality#)
            @Lifted @a @Lifted @a
    ```
    
    We fix this by using `collectArgsTicks tickishFloatable` instead of
    `collectArgs`, to be consistent with the behaviour of eta expansion
    outlined in Note [Eta expansion and source notes] in GHC.Core.Opt.Arity.
    
    Fixes #21152.
    7aeb6d29
    History
    Core Lint: collect args through floatable ticks
    sheaf authored and Marge Bot's avatar Marge Bot committed
    We were not looking through floatable ticks when collecting arguments in
    Core Lint, which caused `checkCanEtaExpand` to fail on something like:
    
    ```haskell
    reallyUnsafePtrEquality
      = \ @a ->
          (src<loc> reallyUnsafePtrEquality#)
            @Lifted @a @Lifted @a
    ```
    
    We fix this by using `collectArgsTicks tickishFloatable` instead of
    `collectArgs`, to be consistent with the behaviour of eta expansion
    outlined in Note [Eta expansion and source notes] in GHC.Core.Opt.Arity.
    
    Fixes #21152.
Code owners
Assign users and groups as approvers for specific file changes. Learn more.