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 568
    • Merge requests 568
  • 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
  • #179
Closed
Open
Issue created Sep 16, 2003 by Simon Peyton Jones@simonpjDeveloper

Instance match failure on openTypeKind

Consider

    instance Show (a->b) where ...

    foo x = show (\ _ -> True)

This fails with:
    No instance for (Show (t -> Bool))
      arising from use of `show' at Foo.hs:5


Reason: the type of (\_ -> True) is  (t -> Bool) where
t has an "openTypeKind".  It's possible that the function 
will be applied to say an Int#, and the openTypeKind 
records that this is OK.

BUT, the instance decl Show (a->b) has 
a::liftedTypeKind, and that doesn't match an 
openTypeKind type variable.


This bug relates to GHC's unsatisfactory treatment of 
the variants of kind "type", for which there are at least 2 
other SourceForge bugs registered (753780 and  
753777).  It's very obscure, so I'm not going to fix it 
today.
Edited Mar 09, 2019 by Simon Marlow
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking