[GHC] #9813: Error when reifying type constructor
GHC
ghc-devs at haskell.org
Mon Feb 15 04:05:24 UTC 2016
#9813: Error when reifying type constructor
-------------------------------------+-------------------------------------
Reporter: owst | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Template Haskell | Version: 7.8.3
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s): Phab:D1899
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by goldfire):
Recent arguments have not shifted me from my proposal in comment:15.
What about
{{{
f = g 5
g = $(...)
}}}
The suggestion to process declarations that do not contain a splice before
declarations that do fails here. Instead, we recognize that `f` and `g`
are in a mutually recursive group and process them together. `g` cannot
reify `f`. Note that comment:15 says that only already-processed
declarations (that is, not in the same mutually recursive group) are
available.
It does strike me (inspired by comment:16) that with all this toposorting
going on, we may be able to avoid having top-level splices break the file
up into declaration groups. The current behavior seems something like a
feeble attempt at a toposort, anyway. I suppose changing this would break
{{{
f = $(...)
$( ... reify 'f ... )
}}}
though. (That code would work now.) So, upon further thought, this
particular aspect of the change seems dead in the water. Note that my
pessimism here is only about comment:16, not comment:15.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9813#comment:21>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list