diff options
Diffstat (limited to 'testsuite/tests/ghci.debugger/scripts/TupleN.hs')
-rw-r--r-- | testsuite/tests/ghci.debugger/scripts/TupleN.hs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/testsuite/tests/ghci.debugger/scripts/TupleN.hs b/testsuite/tests/ghci.debugger/scripts/TupleN.hs new file mode 100644 index 0000000000..528f0ea238 --- /dev/null +++ b/testsuite/tests/ghci.debugger/scripts/TupleN.hs @@ -0,0 +1,10 @@ +module TupleN where +import Language.Haskell.TH + +tuple :: Int -> ExpQ +tuple n = [|\list -> $(tupE (exprs [|list|])) |] + where + exprs list = id [infixE (Just (list)) + (varE '(!!)) + (Just (litE $ integerL (toInteger num))) + | num <- [0..(n - 1)]]
\ No newline at end of file |