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,249
    • Issues 5,249
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 581
    • Merge requests 581
  • 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
  • #22742
Closed
Open
Issue created Jan 12, 2023 by Vladislav Zavialov@int-indexDeveloper

ghc panic: runtimeRepLevity_maybe

Summary

An ill-typed program triggers a panic while printing an error message.

Steps to reproduce

Compile this:

module Bug where

import GHC.Exts (TYPE)

data T (a :: TYPE r) = MkT

f :: T @(f a b) () -> ()
f MkT = ()

GHC tries to print an error message (as can be seen from the error code GHC-83865) but then panics:

Bug.hs:7:17: error: [GHC-83865]ghc: panic! (the 'impossible' happened)
  GHC version 9.7.20230110:
        runtimeRepLevity_maybe

'BoxedRep
Call stack:
    CallStack (from HasCallStack):
      callStackDoc, called at compiler/GHC/Utils/Panic.hs:189:37 in ghc:GHC.Utils.Panic
      pprPanic, called at compiler/GHC/Core/Type.hs:796:22 in ghc:GHC.Core.Type

Expected behavior

A proper error message.

Environment

  • GHC version used: HEAD.
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking