[GHC] #13969: Record pattern synonym incorrectly claims it's recursive, given unbound variable

#13969: Record pattern synonym incorrectly claims it's recursive, given unbound variable -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Keywords: | Operating System: Unknown/Multiple PatternSynonyms | Architecture: | Type of failure: Incorrect Unknown/Multiple | error/warning at compile-time Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- I only have access to an older version (GHC 8.0.1), this may have been fixed. If I define {{{#!hs {-# language PatternSynonyms #-} pattern R{aaa} = uuu }}} it complains about a recursive pattern synonym {{{ $ ghci-8.0.1 -ignore-dot-ghci /tmp/tmp.hs GHCi, version 8.0.1: http://www.haskell.org/ghc/ :? for help [1 of 1] Compiling Main ( /tmp/tmp.hs, interpreted ) /tmp/tmp.hs:1:1: error: Recursive pattern synonym definition with following bindings: R (defined at /tmp/tmp.hs:3:1-22) Failed, modules loaded: none. Prelude> }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13969 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13969: Record pattern synonym incorrectly claims it's recursive, given unbound variable -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: (none) Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Resolution: duplicate | Keywords: | PatternSynonyms Operating System: Unknown/Multiple | Architecture: Type of failure: Incorrect | Unknown/Multiple error/warning at compile-time | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by RyanGlScott): * status: new => closed * resolution: => duplicate Comment: It's fixed in GHC HEAD (probably by #13470): {{{ $ /opt/ghc/head/bin/ghc Bug.hs [1 of 1] Compiling Main ( Bug.hs, Bug.o ) Bug.hs:3:11: error: Not in scope: ‘aaa’ | 3 | pattern R{aaa} = uuu | ^^^ }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13969#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13969: Record pattern synonym incorrectly claims it's recursive, given unbound variable -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: (none) Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Resolution: duplicate | Keywords: | PatternSynonyms Operating System: Unknown/Multiple | Architecture: Type of failure: Incorrect | Unknown/Multiple error/warning at compile-time | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by Iceland_jack): Thanks for verifying! -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13969#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC