summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_compile/syn-perf2.hs
blob: 6f9a9430ae2d6f8cfa014dc30e2c5511773c5a6b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
-- Another type-synonym performance test
--      (#323)
-- Fails in GHC up to 6.6

module ShouldCompile where

type S = Maybe
type S2 n = S (S n)
type S4 n = S2 (S2 n)
type S8 n = S4 (S4 n)
type S16 n = S8 (S8 n)
type S32 n = S16 (S16 n)

type N64 n = S32 (S32 n)

type N64' =
   S ( S ( S ( S ( S ( S ( S ( S (
   S ( S ( S ( S ( S ( S ( S ( S (
   S ( S ( S ( S ( S ( S ( S ( S (
   S ( S ( S ( S ( S ( S ( S ( S (
   S ( S ( S ( S ( S ( S ( S ( S (
   S ( S ( S ( S ( S ( S ( S ( S (
   S ( S ( S ( S ( S ( S ( S ( S (
   S ( S ( S ( S ( S ( S ( S ( S (
   Int
   ))))))))
   ))))))))
   ))))))))
   ))))))))
   ))))))))
   ))))))))
   ))))))))
   ))))))))