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

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

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

GHC - devs mailing list
#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

_______________________________________________
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] #15324: -ddump-splices does not parenthesize rank-n contexts correctly

GHC - devs mailing list
#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

_______________________________________________
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] #15324: -ddump-splices does not parenthesize rank-n contexts correctly

GHC - devs mailing list
In reply to this post by GHC - devs mailing list
#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 <ryan.gl.scott@…>):

 In [changeset:"57733978482dc1e566a7d4cd90d4cbbd1315e3b2/ghc"
 57733978/ghc]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="57733978482dc1e566a7d4cd90d4cbbd1315e3b2"
 Parenthesize rank-n contexts in Convert

 Summary: A simple oversight.

 Test Plan: make test TEST=T15324

 Reviewers: goldfire, bgamari

 Reviewed By: bgamari

 Subscribers: rwbarton, thomie, carter

 GHC Trac Issues: #15324

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

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15324#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] #15324: -ddump-splices does not parenthesize rank-n contexts correctly

GHC - devs mailing list
In reply to this post by GHC - devs mailing list
#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

_______________________________________________
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] #15324: -ddump-splices does not parenthesize rank-n contexts correctly

GHC - devs mailing list
In reply to this post by GHC - devs mailing list
#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

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