summaryrefslogtreecommitdiff
path: root/testsuite/tests/profiling/should_compile/T15108.hs
blob: d0143bf8491014c0a4fe0187a7b0307ce505b341 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
module Main where

main :: IO ()
main = do
  _ <- return $ getInt Circle
  return ()

newtype MyInt = MyInt Int

data Shape = Circle | Square

getInt :: Shape -> MyInt
getInt sh =
  case sh of
    Circle ->
        let (MyInt i) = MyInt 3
        in myInt i
    Square ->
        let (MyInt i) = MyInt 2
        in myInt i
    where
      myInt = MyInt