#7016: Declarations after top-level splice are ignored
----------------------------------------+-----------------------------------
Reporter: Oblosys | Owner:
Type: bug | Status: closed
Priority: normal | Milestone:
Component: Template Haskell | Version: 7.4.2
Resolution: invalid | Keywords:
Os: MacOS X | Architecture: x86_64 (amd64)
Failure: GHC rejects valid program | Difficulty: Unknown
Testcase: | Blockedby:
Blocking: | Related:
----------------------------------------+-----------------------------------
Comment(by Oblosys):
Ah, so it's a feature! :-) Perhaps this could be briefly mentioned in the
documentation? (right after the quieter and less intimidating example). I
thought it was a bug because I couldn't find it there and the error
message didn't mention Template Haskell.
It's just a small issue, but since I use TH to derive type classes for
data declarations, the most appropriate place for the splice would be
close to the data declaration. (Each data type is also accompanied by a
function declaration, which causes the scoping issues.)
I will await the changes from the new directions post!
-- Martijn
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7016#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