[GHC] #15324: -ddump-splices does not parenthesize rank-n contexts correctly

#15324: -ddump-splices does not parenthesize rank-n contexts correctly -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.6.1 Component: Template | Version: 8.4.3 Haskell | 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: -------------------------------------+------------------------------------- Ryan discovers another `-ddump-splices` bug—news at 11: {{{#!hs {-# LANGUAGE RankNTypes #-} {-# LANGUAGE TemplateHaskell #-} {-# OPTIONS_GHC -ddump-splices #-} module Bug where $([d| f :: forall a. (Show a => a) -> a f _ = undefined |]) }}} {{{ $ /opt/ghc/8.4.3/bin/ghci Bug.hs -dsuppress-uniques GHCi, version 8.4.3: http://www.haskell.org/ghc/ :? for help Loaded GHCi configuration from /home/rgscott/.ghci [1 of 1] Compiling Bug ( Bug.hs, interpreted ) Bug.hs:(6,3)-(8,6): Splicing declarations [d| f :: forall a. (Show a => a) -> a f _ = undefined |] ======> f :: forall a. Show a => a -> a f _ = undefined }}} Notice that `f`'s type signature is pretty-printed as `forall a. Show a => a -> a`, which is just wrong. Patch incoming. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15324 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15324: -ddump-splices does not parenthesize rank-n contexts correctly -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: (none) Type: bug | Status: patch Priority: normal | Milestone: 8.6.1 Component: Template Haskell | Version: 8.4.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:D4910 Wiki Page: | -------------------------------------+------------------------------------- Changes (by RyanGlScott): * status: new => patch * differential: => Phab:D4910 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15324#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15324: -ddump-splices does not parenthesize rank-n contexts correctly
-------------------------------------+-------------------------------------
Reporter: RyanGlScott | Owner: (none)
Type: bug | Status: patch
Priority: normal | Milestone: 8.6.1
Component: Template Haskell | Version: 8.4.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:D4910
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Ryan Scott

#15324: -ddump-splices does not parenthesize rank-n contexts correctly -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: (none) Type: bug | Status: merge Priority: normal | Milestone: 8.6.1 Component: Template Haskell | Version: 8.4.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: th/T15324 Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D4910 Wiki Page: | -------------------------------------+------------------------------------- Changes (by RyanGlScott): * status: patch => merge * testcase: => th/T15324 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15324#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15324: -ddump-splices does not parenthesize rank-n contexts correctly -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: (none) Type: bug | Status: closed Priority: normal | Milestone: 8.6.1 Component: Template Haskell | Version: 8.4.3 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: th/T15324 Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D4910 Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: merge => closed * resolution: => fixed Comment: Merged in a6a83d9a26db2593fa0e09dcad4c1411d6deb4ac. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15324#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC