
#10603: Output of -ddump-splices is parenthesized incorrectly -------------------------------------+------------------------------------- Reporter: | Owner: RyanGlScott | Status: new Type: bug | Milestone: Priority: normal | Version: 7.10.1 Component: Template | Operating System: Unknown/Multiple Haskell | Type of failure: Other Keywords: | Blocked By: Architecture: | Related Tickets: Unknown/Multiple | Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Sometimes, Template Haskell splices lack necessary parentheses. Minimal example: {{{ $ ghci -XTemplateHaskell -ddump-splices GHCi, version 7.10.1: http://www.haskell.org/ghc/ :? for help λ> :t $([| case Just 'a' of Just a -> Just ((\x -> x) a) |]) <interactive>:1:3-53: Splicing expression [| case Just 'a' of { Just a_avZ -> Just ((\ x_aw0 -> x_aw0) a_avZ) } |] ======> case Just 'a' of { Just a_a3wI -> Just (\ x_a3wJ -> x_a3wJ a_a3wI) } $([| case Just 'a' of Just a -> Just ((\x -> x) a) |]) :: Maybe Char }}} The suspect part is {{{case Just 'a' of { Just a_a3wI -> Just (\ x_a3wJ -> x_a3wJ a_a3wI) } }}}, which should be {{{case Just 'a' of { Just a_a3wI -> Just ((\ x_a3wJ -> x_a3wJ) a_a3wI) } }}}. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10603 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler