diff options
author | Ryan Scott <ryan.gl.scott@gmail.com> | 2020-08-01 13:33:33 -0400 |
---|---|---|
committer | Ryan Scott <ryan.gl.scott@gmail.com> | 2020-08-03 16:36:33 -0400 |
commit | 5a41963271906e776f99a866aa134fb99812e999 (patch) | |
tree | 0026b98ef05a74617f96e386fb66d909dce86b4f /testsuite/tests/quotes/T18521.hs | |
parent | e30fed6c6de1f881ce313900274294a793e42677 (diff) | |
download | haskell-wip/T18521.tar.gz |
Make CodeQ and TExpQ levity polymorphicwip/T18521
The patch is quite straightforward. The only tricky part is that
`Language.Haskell.TH.Lib.Internal` now must be `Trustworthy` instead
of `Safe` due to the `GHC.Exts` import (in order to import `TYPE`).
Since `CodeQ` has yet to appear in any released version of
`template-haskell`, I didn't bother mentioning the change to `CodeQ`
in the `template-haskell` release notes.
Fixes #18521.
Diffstat (limited to 'testsuite/tests/quotes/T18521.hs')
-rw-r--r-- | testsuite/tests/quotes/T18521.hs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/testsuite/tests/quotes/T18521.hs b/testsuite/tests/quotes/T18521.hs new file mode 100644 index 0000000000..9b5965ae3b --- /dev/null +++ b/testsuite/tests/quotes/T18521.hs @@ -0,0 +1,15 @@ +{-# LANGUAGE MagicHash #-} +{-# LANGUAGE TemplateHaskellQuotes #-} +module T18521 where + +import GHC.Exts (Int#) +import Language.Haskell.TH + +a :: Code Q Int# +a = [|| 42# ||] + +b :: CodeQ Int# +b = a + +c :: TExpQ Int# +c = examineCode a |