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

#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

#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

#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

#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

#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

#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
participants (1)
-
GHC