projects
/
ghc-hetmet.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
[project @ 2002-07-02 10:22:13 by wolfgang]
[ghc-hetmet.git]
/
ghc
/
tests
/
ghci
/
prog003
/
D1.hs
1
module D where
2
3
-- data types and an instance
4
data D a = A Int | B Float deriving Eq
5
newtype N a = N Double
6
type T a = (Int,Double)
7
8
-- a class
9
class C a where c :: a -> Int
10
11
-- a function
12
d :: Int -> Int
13
d x = x * 2