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

GHC ghc-devs at haskell.org
Thu Jul 13 14:40:37 UTC 2017


#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


More information about the ghc-tickets mailing list