Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • GHC GHC
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
    • Locked files
  • Issues 5.6k
    • Issues 5.6k
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 667
    • Merge requests 667
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
    • Test cases
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Model experiments
  • Analytics
    • Analytics
    • 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
  • #23734

Non-existant variable in error message in type family instance

Summary

In an error message about unused variables in type family instance, GHC mentions a variable, that doesn't exist in source code.

Steps to reproduce

{-# LANGUAGE TypeFamilies, ExplicitForAll, PolyKinds #-}
module Bug where

type family F
type instance forall a. F = ()

This code produces the following error message:

    • Type variables ‘k’, ‘a’ are bound by a forall,
        but not used in the family instance

What is k? Why GHC mentions it?

Expected behavior

Type variable ‘a’ is bound by a forall...

Environment

  • GHC version used:
    • Versions [8.8 .. HEAD] report ‘k’, ‘a’
    • 8.6 cannot parse this syntax.
Edited Aug 01, 2023 by sheaf
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking