[GHC] #10743: Data declaration order matters to compiler.
GHC
ghc-devs at haskell.org
Thu Aug 6 09:00:52 UTC 2015
#10743: Data declaration order matters to compiler.
-------------------------------------+-------------------------------------
Reporter: thomaseding | Owner:
Type: bug | Status: closed
Priority: normal | Milestone:
Component: Compiler | Version: 7.8.3
Resolution: invalid | Keywords:
Operating System: Windows | Architecture:
Type of failure: GHC rejects | Unknown/Multiple
valid program | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Revisions:
-------------------------------------+-------------------------------------
Changes (by bgamari):
* status: new => closed
* resolution: => invalid
Comment:
This is (arguably unfortunately) the expected behavior. See the discussion
of "declaration groups" in
[https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/template-
haskell.html Section 7.17.1] of the User's Guide.
In short, splices delimit groups of declarations. Declarations can only be
recursive within their group. The usual solution here would be to move the
`makeLenses` splice after the `data NonPlayer` definition.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10743#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list