summaryrefslogtreecommitdiff
path: root/testsuite/tests/th/T5665a.hs
diff options
context:
space:
mode:
authorRyanGlScott <ryan.gl.scott@gmail.com>2015-12-22 11:25:59 +0100
committerBen Gamari <ben@smart-cactus.org>2015-12-22 13:22:29 +0100
commitf975b0b10b2971d00b6e1986e0a2af2bf759a4f4 (patch)
tree8b890f6e8058bb0a625a409de70f107101048d8d /testsuite/tests/th/T5665a.hs
parentb407bd775d9241023b4694b3142a756df0082ea2 (diff)
downloadhaskell-f975b0b10b2971d00b6e1986e0a2af2bf759a4f4.tar.gz
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
Diffstat (limited to 'testsuite/tests/th/T5665a.hs')
-rw-r--r--testsuite/tests/th/T5665a.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/testsuite/tests/th/T5665a.hs b/testsuite/tests/th/T5665a.hs
index b34131e974..2b558271b3 100644
--- a/testsuite/tests/th/T5665a.hs
+++ b/testsuite/tests/th/T5665a.hs
@@ -2,6 +2,6 @@ module T5665a where
import Language.Haskell.TH
-doSomeTH s tp = return [NewtypeD [] n [] Nothing
- (NormalC n [(NotStrict, ConT tp)]) []]
+doSomeTH s tp = return [NewtypeD [] n [] Nothing (NormalC n
+ [(Bang NoSourceUnpackedness NoSourceStrictness, ConT tp)]) []]
where n = mkName s