[GHC] #8961: Require PatternSynonyms language extension to *use* pattern synonyms

GHC ghc-devs at haskell.org
Mon Apr 7 16:09:58 UTC 2014


#8961: Require PatternSynonyms language extension to *use* pattern synonyms
-------------------------------------+-------------------------------------
        Reporter:  cactus            |            Owner:  cactus
            Type:  bug               |           Status:  closed
        Priority:  normal            |        Milestone:  7.8.1
       Component:  Compiler (Type    |          Version:  7.8.1-rc2
  checker)                           |         Keywords:
      Resolution:  fixed             |     Architecture:  Unknown/Multiple
Operating System:  Unknown/Multiple  |       Difficulty:  Easy (less than 1
 Type of failure:  None/Unknown      |  hour)
       Test Case:                    |       Blocked By:
        Blocking:                    |  Related Tickets:
-------------------------------------+-------------------------------------

Comment (by isaacdupree):

 I'm sceptical of this change.  It means a library module can't
 transparently replace a data type with a pattern synonym in a new version.
 Modules that depend on the library would break unless they add a flag.
 Unlike with GADTs, this ability is one of the reasons for pattern synonyms
 existing.

 (The consistency and immaturity arguments are tempting, though.)

 Is there a technical reason along the lines of #2905's `RelaxedPolyRec`
 that makes pattern-matching pattern synonyms work poorly without a
 language extension?

 -Isaac

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8961#comment:9>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list