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,249
    • Issues 5,249
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 573
    • Merge requests 573
  • 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
  • #11635
Closed
Open
Issue created Feb 24, 2016 by Oleg Grenrus@phadejDeveloper

Higher-rank kind in datatype definition rejected

Example program:

{-# LANGUAGE TypeInType, KindSignatures, ExplicitForAll #-}
import Data.Kind
data X (a :: forall k. k -> * ) = X

errors with

polykind.hs:3:1: error:
    Expecting one more argument to ‘a’
    Expected kind ‘k0’, but ‘a’ has kind ‘forall k. k -> *’

Without TypeInType, the error is better, yet gives false hint:

polykind.hs:3:23: error:
    Illegal kind: forall k. k -> *
    Did you mean to enable TypeInType?

For the record 7.10.3 doesn't recognise polymorphic kinds at all (same program, without Data.Kind import):

polykind.hs:3:23: parse error on input ‘forall’

Which makes me think that polymorphic kinds are somehow supported, but maybe not.

Edited Mar 10, 2019 by Ben Gamari
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking