[commit: ghc] master: Rework Template Haskell's handling of strictness (f975b0b)
git at git.haskell.org
git at git.haskell.org
Tue Dec 22 12:21:43 UTC 2015
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/f975b0b10b2971d00b6e1986e0a2af2bf759a4f4/ghc
>---------------------------------------------------------------
commit f975b0b10b2971d00b6e1986e0a2af2bf759a4f4
Author: RyanGlScott <ryan.gl.scott at gmail.com>
Date: Tue Dec 22 11:25:59 2015 +0100
Rework Template Haskell's handling of strictness
Currently, Template Haskell's treatment of strictness is not enough to
cover all possible combinations of unpackedness and strictness. In
addition, it isn't equipped to deal with new features (such as
`-XStrictData`) which can change a datatype's fields' strictness during
compilation.
To address this, I replaced TH's `Strict` datatype with
`SourceUnpackedness` and `SourceStrictness` (which give the programmer a
more complete toolkit to configure a datatype field's strictness than
just `IsStrict`, `IsLazy`, and `Unpack`). I also added the ability to
reify a constructor fields' strictness post-compilation through the
`reifyConStrictness` function.
Fixes #10697.
Test Plan: ./validate
Reviewers: simonpj, goldfire, bgamari, austin
Reviewed By: goldfire, bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1603
GHC Trac Issues: #10697
>---------------------------------------------------------------
f975b0b10b2971d00b6e1986e0a2af2bf759a4f4
compiler/deSugar/DsMeta.hs | 35 +++--
compiler/hsSyn/Convert.hs | 24 ++-
compiler/prelude/THNames.hs | 98 ++++++++-----
compiler/typecheck/TcSplice.hs | 43 ++++--
docs/users_guide/7.12.1-notes.rst | 3 +
libraries/ghci/GHCi/Message.hs | 29 ++--
libraries/ghci/GHCi/TH.hs | 1 +
libraries/ghci/GHCi/TH/Binary.hs | 5 +-
libraries/template-haskell/Language/Haskell/TH.hs | 16 +-
.../template-haskell/Language/Haskell/TH/Lib.hs | 97 +++++++-----
.../template-haskell/Language/Haskell/TH/Ppr.hs | 66 +++++++--
.../template-haskell/Language/Haskell/TH/Syntax.hs | 162 ++++++++++++++-------
libraries/template-haskell/changelog.md | 12 ++
.../should_run/overloadedrecfldsrun04.hs | 5 +-
testsuite/tests/rts/T7919A.hs | 4 +-
testsuite/tests/th/T10697_decided_1.hs | 11 ++
testsuite/tests/th/T10697_decided_1.stdout | 1 +
testsuite/tests/th/T10697_decided_2.hs | 11 ++
testsuite/tests/th/T10697_decided_2.stdout | 1 +
testsuite/tests/th/T10697_decided_3.hs | 11 ++
testsuite/tests/th/T10697_decided_3.stdout | 1 +
testsuite/tests/th/T10697_source.hs | 57 ++++++++
.../th/{T1830_3.stdout => T10697_source.stdout} | 2 +
testsuite/tests/th/T10697_sourceUtil.hs | 35 +++++
testsuite/tests/th/T10819_Lib.hs | 4 +-
testsuite/tests/th/T10828.hs | 20 ++-
testsuite/tests/th/T10828a.hs | 9 +-
testsuite/tests/th/T10828b.hs | 30 +++-
testsuite/tests/th/T5290.hs | 3 +-
testsuite/tests/th/T5290.stderr | 10 +-
testsuite/tests/th/T5665a.hs | 4 +-
testsuite/tests/th/T5984_Lib.hs | 7 +-
testsuite/tests/th/T7532.hs | 2 +-
testsuite/tests/th/T7532.stderr | 4 +-
testsuite/tests/th/T7532a.hs | 4 +-
testsuite/tests/th/TH_genExLib.hs | 3 +-
testsuite/tests/th/all.T | 9 ++
37 files changed, 615 insertions(+), 224 deletions(-)
Diff suppressed because of size. To see it, use:
git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc f975b0b10b2971d00b6e1986e0a2af2bf759a4f4
More information about the ghc-commits
mailing list