summaryrefslogtreecommitdiff
path: root/testsuite/tests/ghci/prog003/D2.hs
blob: a53a8c3da6d539165040c4189faa35d23029f535 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
module D where

-- data types and an instance
data D a = A Int | B Float deriving Eq
newtype N a = N Double
type T a = (Int,Double)

-- a class
class C a where c :: a -> Int

-- a function
d :: Float -> Float
d x = x / 3