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,393
    • Issues 5,393
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 589
    • Merge requests 589
  • 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
  • #9264
Closed
Open
Issue created Jul 04, 2014 by Richard Eisenberg@raeDeveloper

Scoped kind variables do not work with default associated types

I have

{-# LANGUAGE PolyKinds, TypeFamilies, ScopedTypeVariables #-}

module Bug where

class C (a :: k) where
  type F (a :: k)
  type F (a :: k) = Int

Compiling gives me

Bug.hs:7:11:
    The signature specified kind ‘k1’, but ‘a’ has kind ‘k2’
    In the type ‘(a :: k)’
    In the type instance declaration for ‘F’
    In the class declaration for ‘C’

The error is on the line declaring the default associated type for F. This happens in both 7.8.2 and HEAD. Having !ScopedTypeVariables causes no change, but I put it in the example to emphasize that adding !ScopedTypeVariables is not the solution.

Trac metadata
Trac field Value
Version 7.8.2
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking