Perhaps the Backpack section of the user guide could devote a paragraph or subsection to explaining the interaction between indefinite libraries and TH code.
I've found that splicing TH code from libraries that are still indefinite (that is: libraries that have module signatures still unfilled) causes errors like
ghc: ^^ Could not load 'lesson9zmtemplatezmhaskellzm1zi0zi0zi0zminplacezmcorezmAfo5JIVDJVcCScFF1FkCSzz_CoreziTH_makeIdFunc_closure', dependency unresolved. See top entry above.
GHC.ByteCode.Linker.lookupCE
During interactive linking, GHCi couldn't find the following symbol:
lesson9zmtemplatezmhaskellzm1zi0zi0zi0zminplacezmcorezmAfo5JIVDJVcCScFF1FkCSzz_CoreziTH_makeIdFunc_closure
I'm not 100% sure, but the problem might be that indefinite libraries get typecheked, but not compiled down to object code (they can't be, because they have "holes" in the form of module signatures).
Therefore, when splicing the code, there's no actual TH code to run! So this is not a bug, but an insurmountable limitation of Backpack (although the errors could be better).
Perhaps the Backpack section of the user guide could devote a paragraph or subsection to explaining the interaction between indefinite libraries and TH code.
I've found that splicing TH code from libraries that are still indefinite (that is: libraries that have module signatures still unfilled) causes errors like
I wrote a longer description of the problem here.
I'm not 100% sure, but the problem might be that indefinite libraries get typecheked, but not compiled down to object code (they can't be, because they have "holes" in the form of module signatures).
Therefore, when splicing the code, there's no actual TH code to run! So this is not a bug, but an insurmountable limitation of Backpack (although the errors could be better).