[GHC] #1012: ghc panic with mutually recursive modules and template haskell
GHC
ghc-devs at haskell.org
Sun May 15 03:34:45 UTC 2016
#1012: ghc panic with mutually recursive modules and template haskell
-------------------------------------+-------------------------------------
Reporter: guest | Owner:
Type: bug | Status: new
Priority: lowest | Milestone:
Component: Template Haskell | Version: 6.8.2
Resolution: | Keywords: hs-boot
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
| TH_import_loop
Blocked By: | Blocking:
Related Tickets: #9032 | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by ezyang):
This bug still exists in GHC 8.0, although it can be a bit tricky to
trigger if the topsort picks an ordering of modules which masks the error.
I found this especially surprising because in the parallel upsweep case we
seem to try to block, c.f. this comment in GhcMake
{{{
2. A module that depends on a module in an external loop can't proceed
until the entire loop is re-typechecked.
}}}
and this code:
{{{
-- If this module depends on a module within a loop then it must wait
for
-- that loop to get re-typechecked, i.e. it must wait on the module
that
-- finishes that loop. These extra dependencies are this module's
-- "external" loop dependencies, because this module is outside of the
-- loop(s) in question.
let ext_loop_deps = Set.fromList
[ head loop | loop <- comp_graph_loops
, any (`Set.member` textual_deps) loop
, this_build_mod `notElem` loop ]
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/1012#comment:42>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list