summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorRyan Scott <ryan.gl.scott@gmail.com>2017-10-07 16:58:56 -0400
committerRyan Scott <ryan.gl.scott@gmail.com>2017-10-07 16:58:56 -0400
commit341d3a7896385f14580d048ea7681232e5b242ce (patch)
tree207589cc359112e0f6e198312920aa42bb4460d2 /docs
parentf6bca0c5e3c53fa6f06949d4f997d0f1761ae06b (diff)
downloadhaskell-341d3a7896385f14580d048ea7681232e5b242ce.tar.gz
Incorporate changes from #11721 into Template Haskell
Summary: #11721 changed the order of type variables in GADT constructor type signatures, but these changes weren't reflected in Template Haskell reification of GADTs. Let's do that. Along the way, I: * noticed that the `T13885` test was claiming to test TH reification of GADTs, but the reified data type wasn't actually a GADT! Since this patch touches that part of the codebase, I decided to fix this. * incorporated some feedback from @simonpj in https://phabricator.haskell.org/D3687#113566. (These changes alone don't account for any different in behavior.) Test Plan: make test TEST=T11721_TH Reviewers: goldfire, austin, bgamari, simonpj Reviewed By: goldfire, bgamari, simonpj Subscribers: rwbarton, thomie, simonpj GHC Trac Issues: #11721 Differential Revision: https://phabricator.haskell.org/D4070
Diffstat (limited to 'docs')
-rw-r--r--docs/users_guide/8.4.1-notes.rst10
1 files changed, 10 insertions, 0 deletions
diff --git a/docs/users_guide/8.4.1-notes.rst b/docs/users_guide/8.4.1-notes.rst
index dc762602e2..f59d266789 100644
--- a/docs/users_guide/8.4.1-notes.rst
+++ b/docs/users_guide/8.4.1-notes.rst
@@ -197,6 +197,16 @@ Template Haskell
such as ``data T1 a = (a ~ Int) => MkT1`` being reified as a GADT and
``data T2 a where MkT2 :: Show a => T2 a`` *not* being reified as a GADT.
+ In addition, reified GADT constructors now more accurately track the order in
+ which users write type variables. Before, if you reified ``MkT`` as below: ::
+
+ data T a where
+ MkT :: forall b a. b -> T a
+
+ Then the reified type signature of ``MkT`` would have been headed by
+ ``ForallC [PlainTV a, PlainTV b]``. Now, reifying ``MkT`` will give a type
+ headed by ``ForallC [PlainTV b, PlainTV a]``, as one would expect.
+
``ghc`` library
~~~~~~~~~~~~~~~