[GHC] #12584: Bug (or Unhelpful Error) with TemplateHaskell

#12584: Bug (or Unhelpful Error) with TemplateHaskell -------------------------------------+------------------------------------- Reporter: Shayan-Najd | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.1 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: -------------------------------------+------------------------------------- To recreate this make a Haskell file say named 'T.hs', with the following code: {{{#!hs {-# LANGUAGE TemplateHaskell #-} (() -> ()) }}} Then try to compile it: {{{ $> ghc-stage2 T.hs [...] ghc-stage2: panic! (the 'impossible' happened) (GHC version 8.1.20160617 for x86_64-unknown-linux): tcMonoExpr _ [...] }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12584 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12584: Bug (or Unhelpful Error) with TemplateHaskell -------------------------------------+------------------------------------- Reporter: Shayan-Najd | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by Shayan-Najd): similarly for {{{#!hs {-# LANGUAGE TemplateHaskell #-} a@b }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12584#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12584: Bug (or Unhelpful Error) with TemplateHaskell -------------------------------------+------------------------------------- Reporter: Shayan-Najd | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.1 Resolution: | Keywords: newcomer Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by mpickering): * keywords: => newcomer -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12584#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12584: Renamer is not applied properly to the expressions in declaration splices -------------------------------------+------------------------------------- Reporter: Shayan-Najd | Owner: Type: bug | Status: new Priority: high | Milestone: Component: Compiler | Version: 8.1 Resolution: | Keywords: newcomer Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by Shayan-Najd): * priority: normal => high * cc: simonpj (added) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12584#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12584: Renamer is not applied properly to the expressions in declaration splices -------------------------------------+------------------------------------- Reporter: Shayan-Najd | Owner: Type: bug | Status: patch Priority: high | Milestone: Component: Compiler | Version: 8.1 Resolution: | Keywords: newcomer Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D2539 Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: new => patch * differential: => Phab:D2539 Comment: The problem here is that `RnExpr.patSynErr` returns a `EWildPat`, which shouldn't appear in the AST post-renaming. See Phab:D2539 for one possible fix. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12584#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12584: Renamer is not applied properly to the expressions in declaration splices -------------------------------------+------------------------------------- Reporter: Shayan-Najd | Owner: Type: bug | Status: patch Priority: high | Milestone: 8.0.2 Component: Compiler | Version: 8.0.1 Resolution: | Keywords: newcomer Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D2539 Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * version: 8.1 => 8.0.1 * milestone: => 8.0.2 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12584#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12584: Renamer is not applied properly to the expressions in declaration splices -------------------------------------+------------------------------------- Reporter: Shayan-Najd | Owner: Type: bug | Status: patch Priority: high | Milestone: 8.0.2 Component: Compiler | Version: 8.0.1 Resolution: | Keywords: newcomer Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D2539 Wiki Page: | -------------------------------------+------------------------------------- Comment (by bgamari): I've updated Phab:D2539 with a new approach suggested by Simon. Let's see whether it passes Harbormaster. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12584#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12584: Renamer is not applied properly to the expressions in declaration splices -------------------------------------+------------------------------------- Reporter: Shayan-Najd | Owner: Type: bug | Status: patch Priority: high | Milestone: 8.0.2 Component: Compiler | Version: 8.0.1 Resolution: | Keywords: newcomer Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D2539 Wiki Page: | -------------------------------------+------------------------------------- Changes (by RyanGlScott): * cc: RyanGlScott (added) Comment: BTW, #12411 demonstrates another occurrence of the same error message. I have no idea if Phab:2359 happens to fix that bug too, however. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12584#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12584: Renamer is not applied properly to the expressions in declaration splices
-------------------------------------+-------------------------------------
Reporter: Shayan-Najd | Owner:
Type: bug | Status: patch
Priority: high | Milestone: 8.0.2
Component: Compiler | Version: 8.0.1
Resolution: | Keywords: newcomer
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s): Phab:D2539
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Ben Gamari

#12584: Renamer is not applied properly to the expressions in declaration splices -------------------------------------+------------------------------------- Reporter: Shayan-Najd | Owner: Type: bug | Status: closed Priority: high | Milestone: 8.0.2 Component: Compiler | Version: 8.0.1 Resolution: fixed | Keywords: newcomer Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D2539 Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: patch => closed * resolution: => fixed -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12584#comment:9 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12584: Renamer is not applied properly to the expressions in declaration splices -------------------------------------+------------------------------------- Reporter: Shayan-Najd | Owner: Type: bug | Status: closed Priority: high | Milestone: 8.0.2 Component: Compiler | Version: 8.0.1 Resolution: fixed | Keywords: newcomer Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D2539 Wiki Page: | -------------------------------------+------------------------------------- Comment (by RyanGlScott): Ben, you set this milestone to 8.0.2, but marked the issue as closed. Should this be set as merge? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12584#comment:10 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12584: Renamer is not applied properly to the expressions in declaration splices
-------------------------------------+-------------------------------------
Reporter: Shayan-Najd | Owner:
Type: bug | Status: closed
Priority: high | Milestone: 8.0.2
Component: Compiler | Version: 8.0.1
Resolution: fixed | Keywords: newcomer
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s): Phab:D2539
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Ryan Scott

#12584: Renamer is not applied properly to the expressions in declaration splices -------------------------------------+------------------------------------- Reporter: Shayan-Najd | Owner: Type: bug | Status: closed Priority: high | Milestone: 8.0.2 Component: Compiler | Version: 8.0.1 Resolution: fixed | Keywords: newcomer Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D2539 Wiki Page: | -------------------------------------+------------------------------------- Comment (by bgamari): Thanks for pointing that out, Ryan! comment:8 was merged to `ghc-8.0` as 47ae01bfb7ca426188d85c6ecb33ebbacc837aa6. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12584#comment:12 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12584: Renamer is not applied properly to the expressions in declaration splices
-------------------------------------+-------------------------------------
Reporter: Shayan-Najd | Owner:
Type: bug | Status: closed
Priority: high | Milestone: 8.0.2
Component: Compiler | Version: 8.0.1
Resolution: fixed | Keywords: newcomer
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s): Phab:D2539
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Ryan Scott
participants (1)
-
GHC