#2739: GHC API crashes on template haskell splices
---------------------------------+------------------------------------------
Reporter: waern | Owner: nominolo
Type: bug | Status: assigned
Priority: normal | Milestone:
Component: Compiler | Version: 6.10.1
Severity: major | Resolution:
Keywords: | Difficulty: Unknown
Testcase: | Os: Unknown/Multiple
Architecture: Unknown/Multiple |
---------------------------------+------------------------------------------
Changes (by nominolo):
* status: new => assigned
* owner: => nominolo
Comment:
I cannot reproduce a {{{fromJust}}} error, however, when compiling with
the GHC API with {{{HscNothing}}} as target, I get a message explaining
that the closure for {{{decl}}} could not be found. This makes sense
since in nothing-mode we fake a bytecode object to avoid recompilation of
that module when its source hasn't changed.
So we have to decide how to deal with this. We could probably detect
dependency whether TH is being used during dependency analysis and either
fail or force the target to {{{HscInterpreted}}} or {{{HscC}}} since the
former may fail if, for example, unboxed tuples are used anywhere in the
source.
Using HEAD's haddock it consequently fails in Linker.getLinkDeps:
{{{
$ ../../ghc/utils/haddock/install-inplace/bin/haddock.exe -B ../../ghc/
TH2.hs
haddock: internal Haddock or GHC error: expectJust getLinkDeps
}}}
I have to think about what a reasonable solution would be.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2739#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs