Commit d44bc5c0 authored by thomie's avatar thomie Committed by Ben Gamari
Browse files

TemplateHaskell: revive isStrict, notStrict and unpacked

These 3 functions are useful to keep around a bit longer, to prevent
breaking existing code that uses them.

Related to #10697.

Reviewers: austin, goldfire, RyanGlScott, bgamari

Reviewed By: RyanGlScott, bgamari

Differential Revision:
parent 88d6d5aa
......@@ -125,6 +125,7 @@ module Language.Haskell.TH(
-- **** Strictness
noSourceUnpackedness, sourceNoUnpack, sourceUnpack,
noSourceStrictness, sourceLazy, sourceStrict,
isStrict, notStrict, unpacked,
bang, bangType, varBangType, strictType, varStrictType,
-- **** Class Contexts
cxt, classP, equalP,
......@@ -656,6 +656,20 @@ noSourceStrictness = return NoSourceStrictness
sourceLazy = return SourceLazy
sourceStrict = return SourceStrict
{-# DEPRECATED isStrict
["Use 'bang'. See ",
"Example usage: 'bang noSourceUnpackedness sourceStrict'"] #-}
{-# DEPRECATED notStrict
["Use 'bang'. See ",
"Example usage: 'bang noSourceUnpackedness noSourceStrictness'"] #-}
{-# DEPRECATED unpacked
["Use 'bang'. See ",
"Example usage: 'bang sourceUnpack sourceStrict'"] #-}
isStrict, notStrict, unpacked :: Q Strict
isStrict = bang noSourceUnpackedness sourceStrict
notStrict = bang noSourceUnpackedness noSourceStrictness
unpacked = bang sourceUnpack sourceStrict
bang :: SourceUnpackednessQ -> SourceStrictnessQ -> BangQ
bang u s = do u' <- u
s' <- s
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment