summaryrefslogtreecommitdiff
path: root/testsuite/tests/ghc-regress/ghci/prog003/D1.hs
blob: 4414d65d2af79e0780769324d1aac77ddc6f717b (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 :: Int -> Int
d x = x * 2