[GHC] #11646: Make pattern synonym export type mismatch a warning

GHC ghc-devs at haskell.org
Sat Jul 23 02:20:42 UTC 2016


#11646: Make pattern synonym export type mismatch a warning
-------------------------------------+-------------------------------------
        Reporter:  dfeuer            |                Owner:
            Type:  feature request   |               Status:  closed
        Priority:  normal            |            Milestone:
       Component:  Compiler (Type    |              Version:  8.0.1-rc2
  checker)                           |             Keywords:
      Resolution:  wontfix           |  PatternSynonyms
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  GHC rejects       |  Unknown/Multiple
  valid program                      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
  PatternSynonyms/AssociatingSynonyms|
-------------------------------------+-------------------------------------

Comment (by dfeuer):

 Replying to [comment:3 thomie]:
 > No response from submitter. Unclear which problem this feature would
 solve. Please reopen if you disagree.

 I disagree on philosophical grounds somewhat more than practical grounds.
 Pattern synonyms are fundamentally a ''syntactic'' feature. The essential
 idea is that we're writing introduction and elimination functions and
 tying them to construction and pattern matching syntax. In the associated
 pattern syntax, we tie a type constructor ''name'' to pattern synonym
 ''bindings''. The type checker has essentially nothing useful to
 contribute at the export stage. I think it should really stay completely
 out of the way. Others disagree, for their own reasons, but I'd like to at
 least be able to say that ''I'' don't care and I'd like it to leave me
 alone.

 I'll be opening another ticket shortly relating to a more practical
 problem with the way pattern synonyms are typed, to which the most obvious
 solution is essentially "Just let me do what I want, because it can't hurt
 type safety." Same philosophy here.

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


More information about the ghc-tickets mailing list