Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • 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,826
    • Issues 4,826
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 440
    • Merge requests 440
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell Compiler
  • GHCGHC
  • Merge requests
  • !6866

Merged
Created Oct 30, 2021 by sheaf@sheafMaintainer

Default kind variables in type families with -XNoPolyKinds

  • Overview 41
  • Commits 1
  • Pipelines 8
  • Changes 15

We should still default kind variables in type families in the presence of -XNoPolyKinds, as otherwise kind variables introduced by e.g. the function arrow could cause the typechecker to ask the user to enable -XPolyKinds.

For example:

type F :: Type -> Type
type family F t where
  F (a -> b) = b

Here we get a :: TYPE r and with -XNoPolyKinds we should still default r. However, this only applies to kind variables; we should still be able to write:

type R :: RuntimeRep -> Type
type family R r where
  R _ = Int

with -XNoPolyKinds, and not have _ :: RuntimeRep be defaulted.

Fixes #20584 (closed).

Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: T20584