Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
GHC
GHC
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 4,393
    • Issues 4,393
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge Requests 381
    • Merge Requests 381
  • Requirements
    • Requirements
    • List
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Code Review
    • Insights
    • Issue
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #1633

Closed
Open
Opened Aug 23, 2007 by guest@trac-guest

Improve error message for kind mismatches

ext :: Ev st Request res -> ServerPart (EvPar res st) Request Result
ext x = Handle $ \req -> do f <- ask
                            liftIO $ f x req

That's from HAppS/Protocols/HTTP.hs

While trying to bend my head around the involved types, feeling understanding already creeping somewhere, I, in a desperate attempt, copied the code into my source and changed it to

ext' :: Ev st Request res -> ServerPart (EvPar res st) Request Result
ext' x = Handle $ \req -> req

hoping to get a clean, expressive and enlightening type error,

I got this:

    Kind mis-match
    Expected kind `* -> *', but `Result' has kind `*'
    In the type `ServerPart (EvPar res st) Request Result'
    In the type `Ev st Request res
                 -> ServerPart (EvPar res st) Request Result'
    In the type signature for `ext'':
      ext' :: Ev st Request res
              -> ServerPart (EvPar res st) Request Result

Which made me wonder, google and then groan, as I couldn't even figure out what the heck a kind-mismatch is or means, not to mention why ghc points me to the type instead of the code.

My request is for the documentation section "Error messages and their meaning" aka "RTF this if you got that". The terminology of some ghc errors is just begging for references to papers.

Trac metadata
Trac field Value
Version 6.6.1
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Documentation
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system Unknown
Architecture Unknown
Edited Mar 09, 2019 by Simon Marlow
Assignee
Assign to
6.12 branch
Milestone
6.12 branch
Assign milestone
Time tracking
None
Due date
None
Reference: ghc/ghc#1633