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,867
    • Issues 4,867
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 457
    • Merge requests 457
  • 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
  • #152
Closed
Open
Created Jun 13, 2003 by Simon Peyton Jones@simonpjDeveloper

(->) used prefix doesn't work with unboxed kinds

This fails, but should succeed
    f :: (->) Int# Int#
    f x = x


-- Here's the comment from TypeRep:
--
-- funTyCon = mkFunTyCon funTyConName 
--		(mkArrowKinds [liftedTypeKind, 
liftedTypeKind]
--				liftedTypeKind)
-- You might think that (->) should have type (? -> ? -> 
*), and you'd be right
-- But if we do that we get kind errors when saying
--	instance Control.Arrow (->)
-- becuase the expected kind is (*->*->*).  The trouble 
is that the
-- expected/actual stuff in the unifier does not go 
contra-variant, whereas
-- the kind sub-typing does.  Sigh.  It really only 
matters if you use (->) in
-- a prefix way, thus:  (->) Int# Int#.  And this is 
unusual.
Trac metadata
Trac field Value
Version None
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution ResolvedFixed
Component Compiler (Type checker)
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