Skip to content

GitLab

  • Menu
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 4,937
    • Issues 4,937
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 454
    • Merge requests 454
  • 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 Compiler
  • GHCGHC
  • Issues
  • #9201
Closed
Open
Created Jun 12, 2014 by Edward Kmett@ekmett

GHC unexpectedly refines explicit kind signatures

The following program should be rejected by the type checker:

{-# LANGUAGE PolyKinds, FunctionalDependencies, MultiParamTypeClasses #-}

class MonoidalCCC (f :: x -> y) (d :: y -> y -> *) | f -> d where
  ret :: d a (f a)

Instead it is accepted, but the kind variables specified above are 'corrected' during typechecking to:

>>> :browse
class MonoidalCCC (f :: x -> x) (d :: x -> x -> *) | f -> d where
  ret :: d a (f a)

This may be similar in root cause to issue #9200 (closed), but there a valid program is rejected, and here an invalid program is accepted, so the fixes may be quite different.

It seems these kind variables are just being allowed to unify rather than being checked for subsumption.

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