Opened 2 years ago

#14210 new feature request

bkp files cannot find TemplateHaskell symbols (even without Backpack features)

Reported by: ezyang Owned by:
Priority: low Milestone:
Component: Compiler (Linking) Version: 8.2.1
Keywords: backpack Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:


{-# LANGUAGE TemplateHaskell #-}
unit th where
    module TH where
        f = [d| x = True |]
unit p where
    dependency th
    module B where
        import TH

When run, this gives:

ghc: ^^ Could not load 'th_TH_f_closure', dependency unresolved. See top entry above.

During interactive linking, GHCi couldn't find the following symbol:
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:

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.

Change History (0)

Note: See TracTickets for help on using tickets.