summaryrefslogtreecommitdiff
path: root/testsuite/tests/lib/should_run/dynamic003.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/lib/should_run/dynamic003.hs')
-rw-r--r--testsuite/tests/lib/should_run/dynamic003.hs12
1 files changed, 12 insertions, 0 deletions
diff --git a/testsuite/tests/lib/should_run/dynamic003.hs b/testsuite/tests/lib/should_run/dynamic003.hs
new file mode 100644
index 0000000000..fae8bdb276
--- /dev/null
+++ b/testsuite/tests/lib/should_run/dynamic003.hs
@@ -0,0 +1,12 @@
+module Main where
+
+-- Test generation of large TypeReps
+-- (can be used as a benchmark)
+
+import Data.Typeable
+
+f :: Typeable a => Int -> a -> TypeRep
+f 0 a = typeOf a
+f n a = f (n-1) [a]
+
+main = print (f 50000 () == f 50001 ())