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

newtype Size = Size Int

{-# INLINABLE val2 #-}
val2 = Size 17

-- In the core, we should see a comparison against 34#, i.e. constant
-- folding should have happened. We actually see it twice: Once in f's
-- definition, and once in its unfolding.
f n = case val2 of Size s -> s + s > n