Skip to content

The impossible happened (Template Haskell)

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) |]
Edited by Simon Peyton Jones
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information