Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • GHC GHC
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 4,876
    • Issues 4,876
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 458
    • Merge requests 458
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #21452
Closed
Open
Created Apr 29, 2022 by Andreas Klebinger@AndreasKDeveloper

CoreLint: Add note explain the relation between arity and demandSig "arity"

There are three general options

-- The expected case
failIO1
[Arity=2, Dmd=<L><L>b, ...]

-- This is unlikely but possible. The rhs might be wrapped in profiling ticks or other edge cases.
failIO2
[Arity=0, Dmd=<L><L>b]

-- This is invalid! `failIO3` is only supposed to do any work if applied to two arguments. This is at odds with the Dmd sig which says no matter how many arguments (including zero) we apply this will bottom out.
failIO3
[Arity=2, Dmd=b]

I don't think we currently check for this but we probably should as iirc I saw this go wrong while I debugged #21440 (closed)

Edit: Arity=3, Dmd=<L><L>b is also invalid. But we already lint for that.

Edited Jun 28, 2022 by Andreas Klebinger
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking