[GHC] #11224: Program doesn't preserve semantics after pattern synonym inlining.
GHC
ghc-devs at haskell.org
Tue Dec 22 13:33:49 UTC 2015
#11224: Program doesn't preserve semantics after pattern synonym inlining.
-------------------------------------+-------------------------------------
Reporter: anton.dubovik | Owner:
Type: bug | Status: new
Priority: highest | Milestone: 8.0.1
Component: Compiler | Version: 7.10.2
Resolution: | Keywords:
| PatternSynonyms
Operating System: Windows | Architecture: x86_64
Type of failure: Incorrect result | (amd64)
at runtime | Test Case:
Blocked By: | Blocking:
Related Tickets: #11225 | Differential Rev(s): Phab:D1632
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Ben Gamari <ben@…>):
In [changeset:"f40e122b7709c11d4ad20fd5cb26bf719235dbf1/ghc" f40e122/ghc]:
{{{
#!CommitTicketReference repository="ghc"
revision="f40e122b7709c11d4ad20fd5cb26bf719235dbf1"
Fix typechecking for pattern synonym signatures
Various tickets have revealed bad shortcomings in the typechecking of
pattern type synonyms. Discussed a lot in (the latter part of)
Trac #11224.
This patch fixes the most complex issues:
- Both parser and renamer now treat pattern synonyms as an
ordinary LHsSigType. Nothing special. Hooray.
- tcPatSynSig (now in TcPatSyn) typechecks the signature, and
decomposes it into its pieces.
See Note [Pattern synonym signatures]
- tcCheckPatSyn has had a lot of refactoring.
See Note [Checking against a pattern signature]
The result is a lot tidier and more comprehensible.
Plus, it actually works!
NB: this patch doesn't actually address the precise
target of #11224, namely "inlining pattern synonym
does not preserve semantics". That's an unrelated
bug, with a separate patch.
ToDo: better documentation in the user manual
Test Plan: Validate
Reviewers: austin, hvr, goldfire
Subscribers: goldfire, mpickering, thomie, simonpj
Differential Revision: https://phabricator.haskell.org/D1685
GHC Trac Issues: #11224
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11224#comment:26>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list