summaryrefslogtreecommitdiff
path: root/testsuite/tests/safeHaskell/safeLanguage/SafeLang15_A.hs
blob: e20096ef6cfdebb2906b9a479db60fe16df7432d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
module SafeLang15_A (IsoInt, h, showH, P, p, showP) where

newtype IsoInt = I Int

h :: IsoInt
h = I 2

showH :: String
showH = let I n = h
        in show n

data P = P Int

p :: P
p = P 3

showP :: P -> String
showP (P n) = "Should be 3 := " ++ show n