Skip to content
GitLab
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 5,242
    • Issues 5,242
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 567
    • Merge requests 567
  • 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 CompilerGlasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #16635
Closed
Open
Issue created May 07, 2019 by Vladislav Zavialov@int-indexDeveloper

Scoped kind variables are broken

Summary

This does work:

-- f :: [a -> Either a ()]
f = [Left @a :: forall a. a -> Either a ()]

This does not:

-- type F :: [a -> Either a ()]
type F = '[Left @a :: forall a. a -> Either a ()]

An unfortunate asymmetry between terms & types. See a related discussion at https://gitlab.haskell.org/ghc/ghc/wikis/ghc-kinds/kind-inference/tlks

Steps to reproduce

ghci> :set -XScopedTypeVariables -XDataKinds -XPolyKinds -XTypeApplications 
ghci> type F = '[Left @a :: forall a. a -> Either a ()]

<interactive>:3:18: error: Not in scope: type variable ‘a’

Expected behavior

No error.

Environment

  • GHC version used: HEAD.
Edited May 07, 2019 by Richard Eisenberg
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking