[GHC] #11129: Nested TH not allowed in declarations

#11129: Nested TH not allowed in declarations -------------------------------------+------------------------------------- Reporter: andrewthad | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.10.2 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- I tried to do the following with the `singletons` and `derive` libraries: {{{#!hs $(singletons [d| data CrudRoute = AddR | EditR | DeleteR | ViewR deriving (Eq,Ord,Enum,Bounded,Show) data MyRoute = UsersR | ProfileR | RenameR | DogR CrudRoute deriving (Eq,Ord,Show) $( derive makeEnum ''MyRoute ) |]) }}} GHC fails with the following error message: Splices within declaration brackets not (yet) handled by Template Haskell Here is the github issue where this originated: https://github.com/goldfirere/singletons/issues/135#issuecomment-158936027 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11129 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11129: Nested TH not allowed in declarations -------------------------------------+------------------------------------- Reporter: andrewthad | Owner: Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 7.10.2 Resolution: duplicate | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #6089 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by jstolarek): * status: new => closed * resolution: => duplicate * related: => #6089 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11129#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC