[GHC] #13473: Variables in patterns made with QuasiQuotes sometimes don't get bound
GHC
ghc-devs at haskell.org
Fri Mar 24 01:20:54 UTC 2017
#13473: Variables in patterns made with QuasiQuotes sometimes don't get bound
-------------------------------------+-------------------------------------
Reporter: harpocrates | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone:
Component: Template Haskell | Version: 8.0.2
Resolution: | Keywords:
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: |
-------------------------------------+-------------------------------------
Changes (by RyanGlScott):
* cc: facundominguez (added)
* component: Compiler => Template Haskell
Comment:
This regression appeared between GHC 8.0.1 and 8.0.2. I tracked it down to
commit 8d63419478074728eb03082787ea51d498b3e62e:
{{{
From 8d63419478074728eb03082787ea51d498b3e62e Mon Sep 17 00:00:00 2001
From: =?utf8?q?Facundo=20Dom=C3=ADnguez?= <facundo.dominguez at tweag.io>
Date: Wed, 6 Jul 2016 06:48:27 -0300
Subject: [PATCH] Have addModFinalizer expose the local type environment.
Summary:
This annotates the splice point with 'HsSpliced ref e' where 'e' is the
result of the splice. 'ref' is a reference that the typechecker will fill
with
the local type environment.
The finalizer then reads the ref and uses the local type environment,
which
causes 'reify' to find local variables when run in the finalizer.
}}}
Thoughts, Facundo?
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13473#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list