[GHC] #11216: RebindableSyntax with pattern guards needs `fail`

#11216: RebindableSyntax with pattern guards needs `fail` -------------------------------------+------------------------------------- Reporter: goldfire | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.11 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: -------------------------------------+------------------------------------- If I say {{{ {-# LANGUAGE RebindableSyntax #-} module Bug where foo :: (a, b) -> () foo x | (_,_) <- x = () }}} I get {{{ Bug.hs:6:9: error: Not in scope: ‘fail’ }}} Yet even if I bring `fail` into scope, it's not mentioned in the Core produced by my program. And it really shouldn't: there's not a monad in sight! -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11216 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11216: RebindableSyntax with pattern guards needs `fail`
-------------------------------------+-------------------------------------
Reporter: goldfire | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.11
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 Ben Gamari

#11216: RebindableSyntax with pattern guards needs `fail` -------------------------------------+------------------------------------- Reporter: goldfire | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.11 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: T11216 Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * testcase: => T11216 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11216#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11216: RebindableSyntax with pattern guards needs `fail` -------------------------------------+------------------------------------- Reporter: goldfire | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.11 Resolution: | Keywords: | RebindableSyntax Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: T11216 Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by cdsmith): This also applies to bindings in list comprehensions, and is still happening as of GHC 8.0.1. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11216#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11216: RebindableSyntax with pattern guards needs `fail` -------------------------------------+------------------------------------- Reporter: goldfire | Owner: Type: bug | Status: patch Priority: normal | Milestone: 8.2.1 Component: Compiler | Version: 7.11 Resolution: | Keywords: | RebindableSyntax Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: T11216 Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D2896 Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: new => patch * differential: => Phab:D2896 * milestone: => 8.2.1 Comment: Quickly knocked this one off while waiting for a GHC 8.0.2 build. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11216#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11216: RebindableSyntax with pattern guards needs `fail` -------------------------------------+------------------------------------- Reporter: goldfire | Owner: Type: bug | Status: patch Priority: normal | Milestone: 8.2.1 Component: Compiler | Version: 7.11 Resolution: | Keywords: | RebindableSyntax Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: T11216, | T11216A Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D2896 Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * testcase: T11216 => T11216, T11216A -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11216#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11216: RebindableSyntax with pattern guards needs `fail`
-------------------------------------+-------------------------------------
Reporter: goldfire | Owner:
Type: bug | Status: patch
Priority: normal | Milestone: 8.2.1
Component: Compiler | Version: 7.11
Resolution: | Keywords:
| RebindableSyntax
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case: T11216,
| T11216A
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s): Phab:D2896
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Ben Gamari

#11216: RebindableSyntax with pattern guards needs `fail`
-------------------------------------+-------------------------------------
Reporter: goldfire | Owner:
Type: bug | Status: patch
Priority: normal | Milestone: 8.2.1
Component: Compiler | Version: 7.11
Resolution: | Keywords:
| RebindableSyntax
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case: T11216,
| T11216A
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s): Phab:D2896
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Ben Gamari

#11216: RebindableSyntax with pattern guards needs `fail` -------------------------------------+------------------------------------- Reporter: goldfire | Owner: Type: bug | Status: closed Priority: normal | Milestone: 8.2.1 Component: Compiler | Version: 7.11 Resolution: fixed | Keywords: | RebindableSyntax Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: T11216, | T11216A Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D2896 Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: patch => closed * resolution: => fixed -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11216#comment:9 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC