summaryrefslogtreecommitdiff
path: root/testsuite/tests/simplCore/should_compile/T21851_2a.hs
blob: 6c413466c6d4b8b5fd706c74975f5619fcf919ab (plain)
1
2
3
4
5
6
7
8
9
10
11
module T21851_2a where

f :: (Num a, Show b) => a -> b -> String
{-# NOINLINE f #-}
f x y = "no"
{-# RULES "wombat"  f = wombat #-}

wombat :: Show b => Int -> b -> String
{-# INLINEABLE wombat #-}
wombat 0 y = ""
wombat n y = show y ++ wombat (n-1) y