bkp files cannot find TemplateHaskell symbols (even without Backpack features)
{-# LANGUAGE TemplateHaskell #-}
unit th where
module TH where
f = [d| x = True |]
unit p where
dependency th
module B where
import TH
$(f)
When run, this gives:
ghc: ^^ Could not load 'th_TH_f_closure', dependency unresolved. See top entry above.
ByteCodeLink.lookupCE
During interactive linking, GHCi couldn't find the following symbol:
th_TH_f_closure
This may be due to you not asking GHCi to load extra object files,
archives or DLLs needed by your current session. Restart GHCi, specifying
the missing library using the -L/path/to/object/dir and -lmissinglibname
flags, or simply by naming the relevant files on the GHCi command line.
Alternatively, this link failure might indicate a bug in GHCi.
If you suspect the latter, please send a bug report to:
glasgow-haskell-bugs@haskell.org
I am not sure how easy or hard the fix is. We should bump this priority up if we get more serious about supporting Template Haskell with Backpack.
Trac metadata
Trac field | Value |
---|---|
Version | 8.2.1 |
Type | FeatureRequest |
TypeOfFailure | OtherFailure |
Priority | low |
Resolution | Unresolved |
Component | Compiler (Linking) |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |