summaryrefslogtreecommitdiff
path: root/libraries/base/tests/dynamic003.hs
blob: fae8bdb27683f445302c8d6d59b0d672da5d2ec4 (plain)
1
2
3
4
5
6
7
8
9
10
11
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 ())