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,406
    • Issues 5,406
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 598
    • Merge requests 598
  • 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
  • #11334
Closed
Open
Issue created Jan 01, 2016 by Ryan Scott@RyanGlScottMaintainer

GHC panic when calling typeOf on a promoted data constructor

Here's what I did in GHCi to trigger the panic:

$ inplace/bin/ghc-stage2 --interactive
GHCi, version 8.1.20160101: http://www.haskell.org/ghc/  :? for help
λ> :set -XDataKinds
λ> :m Data.Typeable Data.Functor.Compose
λ> typeOf (Proxy :: Proxy 'Compose)
ghc-stage2: panic! (the 'impossible' happened)
  (GHC version 8.1.20160101 for x86_64-unknown-linux):
        piResultTy
  *
  TYPE 'Lifted *

Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug

Enabling -XPolyKinds doesn't trigger the error, though; #10343 (closed) will be triggered instead:

λ> :set -XPolyKinds
λ> typeOf (Proxy :: Proxy 'Compose)

<interactive>:5:1: error:
    • No instance for (Typeable a0) arising from a use of ‘typeOf’
    • In the expression: typeOf (Proxy :: Proxy Compose)
      In an equation for ‘it’: it = typeOf (Proxy :: Proxy Compose)
Trac metadata
Trac field Value
Version 8.1
Type Bug
TypeOfFailure OtherFailure
Priority high
Resolution Unresolved
Component Compiler (Type checker)
Test case
Differential revisions
BlockedBy
Related
Blocking
CC goldfire
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