[GHC] #1065: The impossible happened (Template Haskell)
GHC
trac at galois.com
Fri Dec 22 03:31:30 EST 2006
#1065: The impossible happened (Template Haskell)
-------------------------------+--------------------------------------------
Reporter: sfh23 at cornell.edu | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Template Haskell | Version: 6.6
Severity: normal | Resolution:
Keywords: | Difficulty: Unknown
Testcase: | Architecture: Unknown
Os: Linux |
-------------------------------+--------------------------------------------
Changes (by simonpj):
* component: Compiler => Template Haskell
Old description:
> Error message during compilation:
> ghc-6.6: panic! (the 'impossible' happened)
> (GHC version 6.6 for i386-unknown-linux):
> addImpDecls
>
> This occurrs with the following function definition:
> makeRowContent :: String -> [(String, SqlDecl)] -> Q [Dec]
> makeRowContent tblName lst = do
> [d| data Tbl = Tbl
> instance TableContent Tbl where
> tableName Tbl = $(litE $ StringL tblName)
> $(dataD [] (mkName "Row") [] [recC "Row" []] [])
> instance RowContent Row where
> rowValueString x = "rowValue"
> rowNameString x = "rowName"
> tblName x = $(litE $ StringL tblName) |]
New description:
Error message during compilation:
{{{
ghc-6.6: panic! (the 'impossible' happened)
(GHC version 6.6 for i386-unknown-linux):
addImpDecls
}}}
This occurrs with the following function definition:
{{{
makeRowContent :: String -> [(String, SqlDecl)] -> Q [Dec]
makeRowContent tblName lst = do
[d| data Tbl = Tbl
instance TableContent Tbl where
tableName Tbl = $(litE $ StringL tblName)
$(dataD [] (mkName "Row") [] [recC "Row" []] [])
instance RowContent Row where
rowValueString x = "rowValue"
rowNameString x = "rowName"
tblName x = $(litE $ StringL tblName) |]
}}}
Comment:
I asked the submitter for a repo case. Simon
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1065>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list