summaryrefslogtreecommitdiff
path: root/testsuite/tests/safeHaskell/safeLanguage/SafeLang13_A.hs
blob: c49b0855024dbf25a232364720cffdb636337064 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
module SafeLang13_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