diff options
author | Ryan Scott <ryan.gl.scott@gmail.com> | 2016-08-22 10:39:12 -0400 |
---|---|---|
committer | Ryan Scott <ryan.gl.scott@gmail.com> | 2016-08-22 10:39:13 -0400 |
commit | fb0d87f1c4a35fa2aaf7f6dd55edbc71c7c3b44d (patch) | |
tree | 26e4a690f3d6f393205d2bc498df20f2ff7e0096 /testsuite/tests/th/T12513.hs | |
parent | f9aa996f0af59f32dc7b1528ff78be41413a9c27 (diff) | |
download | haskell-fb0d87f1c4a35fa2aaf7f6dd55edbc71c7c3b44d.tar.gz |
Splice singleton unboxed tuples correctly with Template Haskell
Summary:
Previously, TH would implicitly remove the parentheses when splicing in
singleton unboxed tuple types (e.g., turning `(# Int #)` into `Int`). Luckily,
the fix is simply to delete some code.
Fixes #12513.
Test Plan: make test TEST=T12513
Reviewers: hvr, bgamari, austin, goldfire
Reviewed By: goldfire
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D2462
GHC Trac Issues: #12513
Diffstat (limited to 'testsuite/tests/th/T12513.hs')
-rw-r--r-- | testsuite/tests/th/T12513.hs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/testsuite/tests/th/T12513.hs b/testsuite/tests/th/T12513.hs new file mode 100644 index 0000000000..625e4c4e16 --- /dev/null +++ b/testsuite/tests/th/T12513.hs @@ -0,0 +1,12 @@ +{-# LANGUAGE TemplateHaskell #-} +{-# LANGUAGE UnboxedTuples #-} +module T12513 where + +import Language.Haskell.TH.Lib +import Language.Haskell.TH.Syntax + +f :: $([t| (# Int #) |]) -> Int +f x = x + +g :: $(unboxedTupleT 1 `appT` conT ''Int) -> Int +g x = x |