#10697: Change template-haskell API to allow NOUNPACK, lazy annotations
-------------------------------------+-------------------------------------
Reporter: RyanGlScott | Owner:
Type: feature request | Status: patch
Priority: normal | Milestone:
Component: Template Haskell | Version: 7.10.1
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: #5290, #8347 | Differential Rev(s): Phab:D1603
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Ben Gamari ):
In [changeset:"f975b0b10b2971d00b6e1986e0a2af2bf759a4f4/ghc" f975b0b/ghc]:
{{{
#!CommitTicketReference repository="ghc"
revision="f975b0b10b2971d00b6e1986e0a2af2bf759a4f4"
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
}}}
--
Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10697#comment:21
GHC http://www.haskell.org/ghc/
The Glasgow Haskell Compiler