GHC 8.0.2 panics when trying a simple snippet involving Parsec
I am working through "Create your own Scheme in 48 hours", and the following program:
$ cat SimpleParser.hs import Text.ParserCombinators.Parsec hiding (spaces)
symbol :: Parser Char symbol = anyOf "!$%&|*+-/:<=?>@^_^~#"
causes GHC to crash and burn with a panic message.
Please find the details as follows:
- * PLATFORM and OS DETAILS **
$ sw_vers ProductName: Mac OS X ProductVersion: 10.12.2 BuildVersion: 16C67
$ uname -a Darwin <elided> 16.3.0 Darwin Kernel Version 16.3.0: Thu Nov 17 20:23:58 PST 2016; root:xnu-3789.31.2~1/RELEASE_X86_64 x86_64
- * GHC and Parsec version**
$ ghc --version The Glorious Glasgow Haskell Compilation System, version 8.0.2
$ ghc-pkg list | grep -i parsec
attoparsec-0.13.1.0
parsec-3.1.11
- * crash error message **
$ ghc -v3 SimpleParser.hs Glasgow Haskell Compiler, Version 8.0.2, stage 2 booted by GHC version 7.10.3 Using binary package database: /Library/Frameworks/GHC.framework/Versions/8.0.2-x86_64/usr/lib/ghc-8.0.2/package.conf.d/package.cache Using binary package database: /Users/<elided>/.ghc/x86_64-darwin-8.0.2/package.conf.d/package.cache loading package database /Library/Frameworks/GHC.framework/Versions/8.0.2-x86_64/usr/lib/ghc-8.0.2/package.conf.d loading package database /Users/<elided>/.ghc/x86_64-darwin-8.0.2/package.conf.d wired-in package ghc-prim mapped to ghc-prim-0.5.0.0 wired-in package integer-gmp mapped to integer-gmp-1.0.0.1 wired-in package base mapped to base-4.9.1.0 wired-in package rts mapped to rts wired-in package template-haskell mapped to template-haskell-2.11.1.0 wired-in package ghc mapped to ghc-8.0.2 wired-in package dph-seq not found. wired-in package dph-par not found. Hsc static flags: loading package database /Library/Frameworks/GHC.framework/Versions/8.0.2-x86_64/usr/lib/ghc-8.0.2/package.conf.d loading package database /Users/z0ltan/.ghc/x86_64-darwin-8.0.2/package.conf.d wired-in package ghc-prim mapped to ghc-prim-0.5.0.0 wired-in package integer-gmp mapped to integer-gmp-1.0.0.1 wired-in package base mapped to base-4.9.1.0 wired-in package rts mapped to rts-1.0 wired-in package template-haskell mapped to template-haskell-2.11.1.0 wired-in package ghc mapped to ghc-8.0.2 wired-in package dph-seq not found. wired-in package dph-par not found.
- ** Chasing dependencies:
Chasing modules from: *SimpleParser.hs !!! Chasing dependencies: finished in 0.62 milliseconds, allocated 0.337 megabytes Stable obj: [] Stable BCO: [] Ready for upsweep
[NONREC
ModSummary {
ms_hs_date = 2017-06-28 09:58:23 UTC
ms_mod = Main,
ms_textual_imps = [(Nothing, Prelude),
(Nothing, Text.ParserCombinators.Parsec)]
ms_srcimps = []
}]
- ** Deleting temp files:
Deleting: compile: input file SimpleParser.hs
- ** Checking old interface for Main:
[1 of 1] Compiling Main ( SimpleParser.hs, SimpleParser.o )
- ** Parser [Main]:
!!! Parser [Main]: finished in 0.20 milliseconds, allocated 0.134 megabytes
- ** Renamer/typechecker [Main]:
- ** Deleting temp files:
Deleting:
- ** Deleting temp dirs:
Deleting: ghc: panic! (the 'impossible' happened)
(GHC version 8.0.2 for x86_64-apple-darwin):
initTc: unsolved constraints
WC {wc_insol = [W] anyOf_a1lw :: t_a1lv[tau:1] (CHoleCan: anyOf)}
Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
Trac metadata
Trac field | Value |
---|---|
Version | 8.0.2 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |