[GHC] #10689: compiling singletons-1.1.2.1 as -O1 -fspec-constr fails as 'Template variable unbound in rewrite rule'
GHC
ghc-devs at haskell.org
Sat Jul 25 20:17:01 UTC 2015
#10689: compiling singletons-1.1.2.1 as -O1 -fspec-constr fails as 'Template
variable unbound in rewrite rule'
-------------------------------------+-------------------------------------
Reporter: slyfox | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.10.2-rc2
Keywords: | Operating System: Unknown/Multiple
Architecture: | Type of failure: None/Unknown
Unknown/Multiple |
Test Case: | Blocked By:
Blocking: | Related Tickets:
Differential Revisions: |
-------------------------------------+-------------------------------------
First observed on singletons-1.1.2.1 package ghc-7.10.2.
I've tried to distill it down to a single file.
The file manages to crash both GHC and GHCi.
GHCi:
{{{
$ inplace/bin/ghc-stage2 -hide-all-packages -package=base --interactive
List.hs
GHCi, version 7.11.20150723: http://www.haskell.org/ghc/ :? for help
[1 of 1] Compiling List ( List.hs, interpreted )
ghc-stage2: panic! (the 'impossible' happened)
(GHC version 7.11.20150723 for x86_64-unknown-linux):
floatExpr tick break<2>()
Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
}}}
GHC:
{{{
$ inplace/bin/ghc-stage2 -hide-all-packages -package=base --make List.hs
-dsuppress-all -dsuppress-uniques
[1 of 1] Compiling List ( List.hs, List.o )
ghc-stage2: panic! (the 'impossible' happened)
(GHC version 7.11.20150723 for x86_64-unknown-linux):
Template variable unbound in rewrite rule
m
[a_afdP, x, m, ipv, ipv, sc, sc, sc, sg]
[a_afdP, x, m, ipv, ipv, sc, sc, sc, sg]
[TYPE a_afdP, TYPE x, TYPE Let1627448493XsSym4 x m ipv ipv, sc,
(SCons @~ ... sc sc) `cast` ...]
[TYPE a_afdP, TYPE x, TYPE Let1627448493XsSym4 x ipv ipv ipv, sc,
(SCons @~ ... ipv ipv) `cast` ...]
Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
}}}
The "minimal" single-file sample is attached.
If you need original selfcontained reproducer (79 modules, template
haskell code) this is the version i've started with:
http://code.haskell.org/~slyfox/unbound-template-var.tar.gz
Adjusting path to GHC in '''./trigger-a-bug.bash''' should be enough.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10689>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list