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,866
    • Issues 4,866
    • 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
  • #20914
Closed
Open
Created Jan 07, 2022 by Krzysztof Gogolewski@monoidalDeveloper

Make PrimTyConI contain a type

When using Template Haskell to reify a primitive TyCon, GHC returns a structure containing the number of arguments and whether the saturated TyCon is unlifted.

data Info =
   ...
  -- | A \"primitive\" type constructor, which can't be expressed with a 'Dec'.
  -- Examples: @(->)@, @Int#@.
  | PrimTyConI
       Name
       Arity
       Unlifted
  | ...

I propose to change this to PrimTyConI Name Type.

This interface was written before levity and representation were on a solid ground. It does not say what is the representation of arguments (e.g. FUN is special, !7299 (closed) adds levity-polymorphic arrays), what is the representation of the result (e.g. Int8# and Int64# are both unlifted but represented differently); the boolean cannot represent a levity-polymorphic result, if we ever have it.

This will be consistent with other constructors of Info: ClassOpI and DataConI contains a Type, PatSynI contains a PatSynType.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking