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,243
    • Issues 5,243
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 570
    • Merge requests 570
  • 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
  • #7892
Closed
Open
Issue created May 07, 2013 by MartijnVanSteenbergen@trac-MartijnVanSteenbergen

GHC accepts multiple conflicting kind signatures in type class declarations

Hi,

Consider this suspicious looking program:

{-# LANGUAGE TypeFamilies #-}

class C (f :: * -> *) where
  type F (f :: *) :: *

I use the same type argument name f but specify different kinds. Now I can never define an instance anymore:

instance C [] where
  -- Error: Type indexes must match class instance head
  -- type F () = ()

  -- Error: Expecting one more argument to `[]'
  -- type F [] = ()

I think GHC should verify, if the same type argument name is used multiple times in a type class definition, that their kinds match. In that case the type class above would be rejected.

Trac metadata
Trac field Value
Version 7.6.3
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler (Type checker)
Test case
Differential revisions
BlockedBy
Related
Blocking
CC sjoerd@w3future.com
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