[GHC] #14471: Certain do blocks cause TH to barf when ApplicativeDo is enabled

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

[GHC] #14471: Certain do blocks cause TH to barf when ApplicativeDo is enabled

GHC - devs mailing list
#14471: Certain do blocks cause TH to barf when ApplicativeDo is enabled
-------------------------------------+-------------------------------------
           Reporter:  lexi.lambda    |             Owner:  (none)
               Type:  bug            |            Status:  new
           Priority:  normal         |         Milestone:
          Component:  Template       |           Version:  8.2.1
  Haskell                            |
           Keywords:                 |  Operating System:  Unknown/Multiple
       Architecture:                 |   Type of failure:  Compile-time
  Unknown/Multiple                   |  crash or panic
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 The following program fails with an error:

 {{{#!hs
 {-# LANGUAGE ApplicativeDo #-}
 {-# LANGUAGE TemplateHaskell #-}

 main = $([|do
   return ()
   return ()
   return ()|])
 }}}
 {{{
 Exotic.hs:4:12: error:
     Exotic statement not (yet) handled by Template Haskell
       [return ();
        return (),
        return ()]
 }}}

 It only happens when `ApplicativeDo` is enabled.

 Furthermore, while this example is extremely minimal, this issue isn’t
 restricted to `ApplicativeDo`’s special handling of `return`. The
 following example produces the same error:

 {{{#!hs
 {-# LANGUAGE ApplicativeDo #-}
 {-# LANGUAGE TemplateHaskell #-}

 main = $([|do
   getLine
   getLine
   getLine|])
 }}}
 {{{
 Exotic.hs:4:12: error:
     Exotic statement not (yet) handled by Template Haskell
       [getLine;
        getLine,
        getLine]
 }}}

 This ''doesn’t'' happen with fewer than three statements in the `do`
 block, but it ''does'' happen with more.

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14471>
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] #14471: Certain do blocks cause TH to barf when ApplicativeDo is enabled

GHC - devs mailing list
#14471: Certain do blocks cause TH to barf when ApplicativeDo is enabled
-------------------------------------+-------------------------------------
        Reporter:  lexi.lambda       |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Template Haskell  |              Version:  8.2.1
      Resolution:                    |             Keywords:  ApplicativeDo
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  Compile-time      |  Unknown/Multiple
  crash or panic                     |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------
Changes (by lexi.lambda):

 * keywords:   => ApplicativeDo


--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14471#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] #14471: Certain do blocks cause TH to barf when ApplicativeDo is enabled

GHC - devs mailing list
In reply to this post by GHC - devs mailing list
#14471: Certain do blocks cause TH to barf when ApplicativeDo is enabled
-------------------------------------+-------------------------------------
        Reporter:  lexi.lambda       |                Owner:  mgsloan
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Template Haskell  |              Version:  8.2.1
      Resolution:                    |             Keywords:  ApplicativeDo
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  Compile-time      |  Unknown/Multiple
  crash or panic                     |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):  Phab:D4912
       Wiki Page:                    |
-------------------------------------+-------------------------------------
Changes (by mgsloan):

 * owner:  (none) => mgsloan
 * differential:   => Phab:D4912


--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14471#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] #14471: Certain do blocks cause TH to barf when ApplicativeDo is enabled

GHC - devs mailing list
In reply to this post by GHC - devs mailing list
#14471: Certain do blocks cause TH to barf when ApplicativeDo is enabled
-------------------------------------+-------------------------------------
        Reporter:  lexi.lambda       |                Owner:  mgsloan
            Type:  bug               |               Status:  patch
        Priority:  normal            |            Milestone:
       Component:  Template Haskell  |              Version:  8.2.1
      Resolution:                    |             Keywords:  ApplicativeDo
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  Compile-time      |  Unknown/Multiple
  crash or panic                     |            Test Case:  th/T14471
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):  Phab:D4912
       Wiki Page:                    |
-------------------------------------+-------------------------------------
Changes (by mgsloan):

 * testcase:   => th/T14471
 * status:  new => patch


--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14471#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] #14471: Certain do blocks cause TH to barf when ApplicativeDo is enabled

GHC - devs mailing list
In reply to this post by GHC - devs mailing list
#14471: Certain do blocks cause TH to barf when ApplicativeDo is enabled
-------------------------------------+-------------------------------------
        Reporter:  lexi.lambda       |                Owner:  mgsloan
            Type:  bug               |               Status:  patch
        Priority:  normal            |            Milestone:
       Component:  Template Haskell  |              Version:  8.2.1
      Resolution:                    |             Keywords:  ApplicativeDo
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  Compile-time      |  Unknown/Multiple
  crash or panic                     |            Test Case:  th/T14471
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):  Phab:D4912
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by Ben Gamari <ben@…>):

 In [changeset:"234093cf1562d032b38382a5cc08be8dd71c4fe3/ghc"
 234093cf/ghc]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="234093cf1562d032b38382a5cc08be8dd71c4fe3"
 Fix handling of ApplicativeDo in TH AST quotes

 See https://ghc.haskell.org/trac/ghc/ticket/14471

 Also fixes a parenthesization bug in pprStmt when ret_stripped is True

 Test Plan: tests added to testsuite

 Trac issues: #14471

 Reviewers: goldfire, bgamari

 Reviewed By: goldfire

 Subscribers: rwbarton, thomie, carter

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

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14471#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
Reply | Threaded
Open this post in threaded view
|

Re: [GHC] #14471: Certain do blocks cause TH to barf when ApplicativeDo is enabled

GHC - devs mailing list
In reply to this post by GHC - devs mailing list
#14471: Certain do blocks cause TH to barf when ApplicativeDo is enabled
-------------------------------------+-------------------------------------
        Reporter:  lexi.lambda       |                Owner:  mgsloan
            Type:  bug               |               Status:  closed
        Priority:  normal            |            Milestone:  8.6.1
       Component:  Template Haskell  |              Version:  8.2.1
      Resolution:  fixed             |             Keywords:  ApplicativeDo
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  Compile-time      |  Unknown/Multiple
  crash or panic                     |            Test Case:  th/T14471
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):  Phab:D4912
       Wiki Page:                    |
-------------------------------------+-------------------------------------
Changes (by bgamari):

 * status:  patch => closed
 * resolution:   => fixed
 * milestone:   => 8.6.1


--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14471#comment:5>
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