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,252
    • Issues 5,252
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 577
    • Merge requests 577
  • 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
  • #12024
Closed
Open
Issue created May 07, 2016 by Icelandjack@IcelandjackReporter

GHC leaks GHC.Prim.~# into type

data A a where
  X :: A [xxx]

pattern X' = X

the inferred type of which is

>>> :info X'
pattern X' :: () => t GHC.Prim.~# [xxx] => A t

Casts use unlifted equality as I understand it, but lifted would present a nicer UI:

pattern X' :: () => t ~> [xxx] => A t
pattern X' = X

In my own code this means I get the following monster

pattern MkArr :: () => (GetTy a, GetTy b, GetTy t,
                        a GHC.Prim.~# 'Sca ('Number 'I32), b GHC.Prim.~# 'Sca a1,
                        t GHC.Prim.~# 'Arr a1, GetSca a1) => Exp a -> Id -> Exp b -> Exp t
Trac metadata
Trac field Value
Version 7.10.3
Type FeatureRequest
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
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