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,870
    • Issues 4,870
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 453
    • Merge requests 453
  • 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
  • #21056
Closed
Open
Created Feb 07, 2022 by Richard Eisenberg@raeDeveloper

reifyRoles includes kind parameters

@songzh reported to me via email that

{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeFamilies #-}

import Language.Haskell.TH

data Proxy a = Proxy

yields

> $(reifyRoles ''Proxy >>= stringE.show)
"[PhantomR]"

while adding {-# LANGUAGE PolyKinds #-} to the module above will lead to

$(reifyRoles ''Proxy >>= stringE.show)
"[NominalR,PhantomR]"

This is confusing.

Given that (non-degenerate) invisible parameters are always nominal, we might imagine changing reifyRoles to skip invisible parameters. But this would be backward-incompatible and needlessly disruptive -- especially if we ever decide to allow non-nominal invisible parameters. So I argument for simply documenting this.

Patch coming very shortly.

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