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,929
    • Issues 4,929
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 461
    • Merge requests 461
  • 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
  • #14963
Closed
Open
Created Mar 23, 2018 by elaforge@trac-elaforge

ghci -fdefer-type-errors can't run IO action from another module

This is enough to trigger a crash on OS X and Linux:

Bug1.hs:

module Bug1.hs where
import qualified Bug2

test :: IO Bool
test = Bug2.failure

Bug2.hs:

module Bug2 where

failure :: IO Bool
failure = return False

Shell:

% ghci -fdefer-type-errors -ignore-dot-ghci
GHCi, version 8.4.1: http://www.haskell.org/ghc/  :? for help
Prelude> :load Bug
[1 of 2] Compiling Bug2             ( Bug2.hs, interpreted )
[2 of 2] Compiling Bug              ( Bug.hs, interpreted )
Ok, two modules loaded.
*Bug> test
ghc: panic! (the 'impossible' happened)
  (GHC version 8.4.1 for x86_64-apple-darwin):
	nameModule
  system $dShow_a1LX
  Call stack:
      CallStack (from HasCallStack):
        callStackDoc, called at compiler/utils/Outputable.hs:1150:37 in ghc:Outputable
        pprPanic, called at compiler/basicTypes/Name.hs:241:3 in ghc:Name

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

This is specific to 8.4.1, in 8.0.2 I get "False" as expected. If I leave off -fdefer-type-errors, it works. It also seems to be ghci only, compiling with -fdefer-type-errors doesn't have the problem.

Trac metadata
Trac field Value
Version 8.4.1
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component GHCi
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