summaryrefslogtreecommitdiff
path: root/testsuite/tests/simplCore/should_compile/T21286a.hs
blob: 58f6db9b94e311dd06bb5459d2c96ff41b7d5e71 (plain)
1
2
3
4
5
6
7
8
9
10
{-# OPTIONS_GHC -fexpose-all-unfoldings #-}

module T21286a( f ) where

f :: (Eq a, Num a) => a -> a
f x = g 20 x + 1

g :: (Eq a, Num a) => a -> a -> a
g n x | n + 1 == 0 = 0
      | otherwise  = x + g (n-1) x