#5362: ghc: panic! mkUsageInfo: internal name? constr_a2Py{v}
----------------------------------+-----------------------------------------
Reporter: markwright | Owner:
Type: bug | Status: new
Priority: highest | Milestone: 7.2.1
Component: Template Haskell | Version: 7.1
Keywords: panic mkUsageInfo | Testcase:
http://hackage.haskell.org/package/syb-with-class
Blockedby: | Difficulty:
Os: Linux | Blocking:
Architecture: x86_64 (amd64) | Failure: Compile-time crash
----------------------------------+-----------------------------------------
Changes (by igloo):
* priority: normal => highest
* component: Compiler => Template Haskell
* milestone: => 7.2.1
Comment:
Thanks for the report.
Testcase:
{{{
{-# LANGUAGE TemplateHaskell #-}
module Foo where
import Language.Haskell.TH
$(
do fName <- newName "f"
gName <- newName "g"
let gExp = varE gName
sdf <- sigD fName [t| () |]
sdg <- sigD gName [t| () |]
fdf <- funD fName [clause [] (normalB [| undefined $gExp |]) []]
fdg <- funD gName [clause [] (normalB [| undefined |]) []]
let ds = [sdf, fdf, sdg, fdg]
runIO $ putStrLn $ pprint ds
return ds
)
}}}
{{{
$ ghc --make Foo.hs
[1 of 1] Compiling Foo ( Foo.hs, Foo.o )
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
Loading package ffi-1.0 ... linking ... done.
Loading package pretty-1.1.0.0 ... linking ... done.
Loading package array-0.3.0.3 ... linking ... done.
Loading package containers-0.4.1.0 ... linking ... done.
Loading package template-haskell ... linking ... done.
f_0 :: GHC.Unit.()
f_0 = GHC.Err.undefined g_1
g_1 :: GHC.Unit.()
g_1 = GHC.Err.undefined
}}}
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5362#comment:3>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs