[GHC] #13885: Template Haskell doesn't freshen GADT type variables properly
GHC
ghc-devs at haskell.org
Tue Aug 22 14:56:18 UTC 2017
#13885: Template Haskell doesn't freshen GADT type variables properly
-------------------------------------+-------------------------------------
Reporter: RyanGlScott | Owner: (none)
Type: bug | Status: patch
Priority: normal | Milestone:
Component: Template Haskell | Version: 8.0.1
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: Incorrect result | Unknown/Multiple
at runtime | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s): Phab:D3867
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Ryan Scott <ryan.gl.scott@…>):
In [changeset:"79b259ae6a0a0c17568d7d03d82e378ad4c4001a/ghc"
79b259ae/ghc]:
{{{
#!CommitTicketReference repository="ghc"
revision="79b259ae6a0a0c17568d7d03d82e378ad4c4001a"
Fix #13885 by freshening reified GADT constructors' universal tyvars
Summary:
When reifying GADTs with Template Haskell, the universally quantified
type variables were being reused across both the data type head and the
constructors' type signatures. This had the annoying effect of causing
sets
of differently scoped variables to have the same uniques. To avoid this,
we
now freshen the universal tyvars before reifying the constructors so as to
ensure they have distinct uniques.
Test Plan: make test TEST=T13885
Reviewers: goldfire, austin, bgamari, simonpj
Reviewed By: simonpj
Subscribers: rwbarton, thomie
GHC Trac Issues: #13885
Differential Revision: https://phabricator.haskell.org/D3867
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13885#comment:6>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list