[GHC] #15331: -ddump-splices does not parenthesize visible type applications correctly

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[GHC] #15331: -ddump-splices does not parenthesize visible type applications correctly

GHC - devs mailing list
#15331: -ddump-splices does not parenthesize visible type applications correctly
-------------------------------------+-------------------------------------
           Reporter:  RyanGlScott    |             Owner:  (none)
               Type:  bug            |            Status:  new
           Priority:  normal         |         Milestone:  8.6.1
          Component:  Compiler       |           Version:  8.4.3
           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:
-------------------------------------+-------------------------------------
 So many `-ddump-splices` bugs...

 {{{#!hs
 {-# LANGUAGE TemplateHaskell #-}
 {-# LANGUAGE TypeApplications #-}
 {-# OPTIONS_GHC -ddump-splices #-}
 module Bug where

 import Data.Proxy

 $([d| f :: Proxy (Int -> Int)
       f = Proxy @(Int -> Int)
     |])
 }}}

 {{{
 $ /opt/ghc/8.6.1/bin/ghci Bug.hs
 GHCi, version 8.6.0.20180627: http://www.haskell.org/ghc/  :? for help
 Loaded GHCi configuration from /home/rgscott/.ghci
 [1 of 1] Compiling Bug              ( Bug.hs, interpreted )
 Bug.hs:(8,3)-(10,6): Splicing declarations
     [d| f_a1Dg :: Proxy (Int -> Int)
         f_a1Dg = Proxy @(Int -> Int) |]
   ======>
     f_a4tx :: Proxy (Int -> Int)
     f_a4tx = Proxy @Int -> Int
 }}}

 Ack—`Proxy @Int -> Int` should actually be `Proxy @(Int -> Int)`.

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15331>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler

_______________________________________________
ghc-tickets mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-tickets
Reply | Threaded
Open this post in threaded view
|

Re: [GHC] #15331: -ddump-splices does not parenthesize visible type applications correctly

GHC - devs mailing list
#15331: -ddump-splices does not parenthesize visible type applications correctly
-------------------------------------+-------------------------------------
        Reporter:  RyanGlScott       |                Owner:  (none)
            Type:  bug               |               Status:  patch
        Priority:  normal            |            Milestone:  8.6.1
       Component:  Compiler          |              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:D4920
       Wiki Page:                    |
-------------------------------------+-------------------------------------
Changes (by RyanGlScott):

 * status:  new => patch
 * differential:   => Phab:D4920


--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15331#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler

_______________________________________________
ghc-tickets mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-tickets
Reply | Threaded
Open this post in threaded view
|

Re: [GHC] #15331: -ddump-splices does not parenthesize visible type applications correctly

GHC - devs mailing list
In reply to this post by GHC - devs mailing list
#15331: -ddump-splices does not parenthesize visible type applications correctly
-------------------------------------+-------------------------------------
        Reporter:  RyanGlScott       |                Owner:  (none)
            Type:  bug               |               Status:  patch
        Priority:  normal            |            Milestone:  8.6.1
       Component:  Compiler          |              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:D4920
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by Ryan Scott <ryan.gl.scott@…>):

 In [changeset:"b6a3386186b77333b7a6cdc163499d7dae0dad1c/ghc" b6a3386/ghc]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="b6a3386186b77333b7a6cdc163499d7dae0dad1c"
 Fix #15331 with careful blasts of parenthesizeHsType

 Summary:
 Another `-ddump-splices` bug that can be solved with more
 judicious use of parentheses.

 Test Plan: make test TEST=T15331

 Reviewers: goldfire, bgamari, alanz, tdammers

 Reviewed By: tdammers

 Subscribers: rwbarton, thomie, carter

 GHC Trac Issues: #15331

 Differential Revision: https://phabricator.haskell.org/D4920
 }}}

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15331#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler

_______________________________________________
ghc-tickets mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-tickets
Reply | Threaded
Open this post in threaded view
|

Re: [GHC] #15331: -ddump-splices does not parenthesize visible type applications correctly

GHC - devs mailing list
In reply to this post by GHC - devs mailing list
#15331: -ddump-splices does not parenthesize visible type applications correctly
-------------------------------------+-------------------------------------
        Reporter:  RyanGlScott       |                Owner:  (none)
            Type:  bug               |               Status:  merge
        Priority:  normal            |            Milestone:  8.6.1
       Component:  Compiler          |              Version:  8.4.3
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:  th/T15331
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):  Phab:D4920
       Wiki Page:                    |
-------------------------------------+-------------------------------------
Changes (by RyanGlScott):

 * status:  patch => merge
 * testcase:   => th/T15331


--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15331#comment:3>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler

_______________________________________________
ghc-tickets mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-tickets
Reply | Threaded
Open this post in threaded view
|

Re: [GHC] #15331: -ddump-splices does not parenthesize visible type applications correctly

GHC - devs mailing list
In reply to this post by GHC - devs mailing list
#15331: -ddump-splices does not parenthesize visible type applications correctly
-------------------------------------+-------------------------------------
        Reporter:  RyanGlScott       |                Owner:  (none)
            Type:  bug               |               Status:  closed
        Priority:  normal            |            Milestone:  8.6.1
       Component:  Compiler          |              Version:  8.4.3
      Resolution:  fixed             |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:  th/T15331
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):  Phab:D4920
       Wiki Page:                    |
-------------------------------------+-------------------------------------
Changes (by bgamari):

 * status:  merge => closed
 * resolution:   => fixed


Comment:

 comment:2 merged in f663e507eaf49c6a5e05fd6edb78d649a7611af4.

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15331#comment:4>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler

_______________________________________________
ghc-tickets mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-tickets