[GHC] #15365: Argument-less infix declarations printed without parentheses in -ddump-splices
#15365: Argument-less infix declarations printed without parentheses in -ddump- splices -------------------------------------+------------------------------------- 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: Debugging Unknown/Multiple | information is incorrect Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- Compile this: {{{#!hs {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeOperators #-} {-# OPTIONS_GHC -ddump-splices #-} module Bug where $([d| type (|||) = Either (&&&) :: Bool -> Bool -> Bool (&&&) = (&&) data (***) |]) }}} And you'll get this: {{{ $ /opt/ghc/8.4.3/bin/ghci Bug.hs 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)-(12,6): Splicing declarations [d| (&&&_a1xt) :: Bool -> Bool -> Bool (&&&_a1xt) = (&&) type |||_a1xs = Either data ***_a1xr |] ======> type |||_a5bW = Either (&&&_a5bV) :: Bool -> Bool -> Bool (&&&_a5bV) = (&&) data ***_a5bX Ok, one module loaded. }}} Notice the pretty-printed declarations of `type |||_a5bW` and `data ***_a5bX`, which are lacking some necessary parentheses. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15365> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#15365: Argument-less infix declarations printed without parentheses in -ddump- splices -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: monoidal Type: bug | Status: new Priority: normal | Milestone: 8.6.1 Component: Template Haskell | Version: 8.4.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Debugging | Unknown/Multiple information is incorrect | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by monoidal): * owner: (none) => monoidal -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15365#comment:1> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#15365: Argument-less infix declarations printed without parentheses in -ddump- splices -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: monoidal Type: bug | Status: patch Priority: normal | Milestone: 8.6.1 Component: Template Haskell | Version: 8.4.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Debugging | Unknown/Multiple information is incorrect | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D4998 Wiki Page: | -------------------------------------+------------------------------------- Changes (by monoidal): * status: new => patch * differential: => Phab:D4998 -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15365#comment:2> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#15365: Argument-less infix declarations printed without parentheses in -ddump- splices -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: monoidal Type: bug | Status: patch Priority: normal | Milestone: 8.6.1 Component: Template Haskell | Version: 8.4.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Debugging | Unknown/Multiple information is incorrect | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D4998 Wiki Page: | -------------------------------------+------------------------------------- Comment (by Krzysztof Gogolewski <krz.gogolewski@…>): In [changeset:"3aa09cc5af9cacba91915c095f9652ee5ed31ec7/ghc" 3aa09cc5/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="3aa09cc5af9cacba91915c095f9652ee5ed31ec7" Fix pretty-printing of data declarations in splices Test Plan: validate Reviewers: RyanGlScott, bgamari Reviewed By: RyanGlScott Subscribers: rwbarton, thomie, carter GHC Trac Issues: #15365 Differential Revision: https://phabricator.haskell.org/D4998 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15365#comment:3> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#15365: Argument-less infix declarations printed without parentheses in -ddump- splices -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: monoidal Type: bug | Status: merge Priority: normal | Milestone: 8.6.1 Component: Template Haskell | Version: 8.4.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Debugging | Unknown/Multiple information is incorrect | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D4998 Wiki Page: | -------------------------------------+------------------------------------- Changes (by monoidal): * status: patch => merge -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15365#comment:4> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#15365: Argument-less infix declarations printed without parentheses in -ddump- splices -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: monoidal 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: Type of failure: Debugging | Unknown/Multiple information is incorrect | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D4998 Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: merge => closed * resolution: => fixed Comment: Merged with 4c044ed12d1d2e92580b587ae3a5ad001c1e6173. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15365#comment:5> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
participants (1)
-
GHC