[GHC] #1065: The impossible happened (Template Haskell)

GHC trac at galois.com
Fri Dec 22 03:59:09 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              |  
-------------------------------+--------------------------------------------
Comment (by sfh23 at cornell.edu):

 Compiling this module will replicate the problem:

 {{{
 module Main where

 makeRowContent :: String -> Q [Dec]
 makeRowContent tblName = 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) |]
 }}}

-- 
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