rlwrap on Cygwin
[lambda.git] / rosetta2.mdwn
1 ## More detailed differences between Scheme, OCaml, and Haskell ##
2
3 Here is comparison of the syntax for declaring types in Haskell and OCaml:
4
5     -- Haskell
6     data Pretty a b = Lovely a | Cute b ClothingModule.ButtonType
7     newtype Pretty a b = Pretty a b Int
8     newtype Pretty a b = Pretty { unPretty a }
9     type Pretty a b = (a, b)
10
11     (* OCaml *)
12     type ('a,'b) pretty = Lovely of 'a | Cute of 'b * ClothingModule.ButtonType
13     type ('a,'b) pretty = Pretty of 'a * 'b * int
14     type ('a,'b) pretty = Pretty of 'a
15     type ('a,'b) pretty = 'a * 'b
16
17
18 *Will explain later, and add more material.*
19