diff options
author | Ryan Scott <ryan.gl.scott@gmail.com> | 2020-02-19 17:06:59 -0500 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2020-02-20 21:56:21 -0500 |
commit | 33fa8d9433d82b03f3209698bf27420a32302321 (patch) | |
tree | a9a655bca0d40012fea8581173c94a6fa4e51840 /testsuite/tests/quotes/T17857.hs | |
parent | 581753790da8d094ce05b3fc5f5360f5fbf6a7da (diff) | |
download | haskell-33fa8d9433d82b03f3209698bf27420a32302321.tar.gz |
Generalize liftData to work over any Quote (#17857)
The Overloaded Quotations proposal generalized the type of `lift`
to work over any `Quote`, but not the type of `liftData`, leading
to #17857. Thankfully, generalizing `liftData` is extremely
straightforward.
Fixes #17857.
Diffstat (limited to 'testsuite/tests/quotes/T17857.hs')
-rw-r--r-- | testsuite/tests/quotes/T17857.hs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/testsuite/tests/quotes/T17857.hs b/testsuite/tests/quotes/T17857.hs new file mode 100644 index 0000000000..f64f0ce753 --- /dev/null +++ b/testsuite/tests/quotes/T17857.hs @@ -0,0 +1,10 @@ +{-# LANGUAGE DeriveDataTypeable #-} +module T17857 where + +import Data.Data +import Language.Haskell.TH.Syntax + +data T = MkT deriving Data +instance Lift T where + lift = liftData + liftTyped = unsafeTExpCoerce . lift |