Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • 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,826
    • Issues 4,826
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 443
    • Merge requests 443
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #19460

Closed
Open
Created Feb 28, 2021 by Mitsutoshi Aoe@maoeReporter

GHCi panics due to linkSomeBCOs: no break array with 9.0.1

Summary

ghci-9.0.1 panics with linkSomeBCOs: no break array when defining an instance for the following type class in the REPL:

module Foo (Foo(..)) where

class Foo a where
  bar :: a -> ()
  bar _ = ()

I came across this issue in https://github.com/maoe/influxdb-haskell/pull/85 and the snippet above is the result of code minimization.

Steps to reproduce

  • Save the snippet in the summary as Foo.hs
  • Load it in GHCi and define the following instance in the REPL:
% ghci-9.0.1 Foo.hs
GHCi, version 9.0.1: https://www.haskell.org/ghc/  :? for help
[1 of 1] Compiling Foo              ( Foo.hs, interpreted )
Ok, one module loaded.
ghci> data T = T
ghci> instance Foo T
ghc: panic! (the 'impossible' happened)
  (GHC version 9.0.1:
	linkSomeBCOs: no break array

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

If I delete the default implementation of the method bar, the issue disappears.

Expected behavior

It should just work like 8.10.4:

% ghci-8.10.4 Foo.hs
GHCi, version 8.10.4: https://www.haskell.org/ghc/  :? for help
[1 of 1] Compiling Foo              ( Foo.hs, interpreted )
Ok, one module loaded.
*Foo> data T = T
*Foo> instance Foo T
*Foo>

Environment

  • GHC version used: 9.0.1 installed with ghcup
  • Operating System: macOS 11.2.1 (Big Sur)
  • System Architecture: Intel
Edited Feb 28, 2021 by Mitsutoshi Aoe
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking