summaryrefslogtreecommitdiff
path: root/testsuite/tests/ghc-regress/profiling/should_compile/prof002.hs
blob: 0b631bbcd2e2ea7422c80aad655862acbf187225 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

-- This tests trac #931

module Main where

x = f [1..5] (f [2..] [3..])

f xs ys = l
    where
    l = [ if s then x else y | (x, y) <- zip xs ys ]
    s = g xs ys
    g [] _ = True
    g _ [] = False
    g (x:xs) (y:ys) = g xs ys

main = print (show x)