-
Notifications
You must be signed in to change notification settings - Fork 58
/
Copy pathHello.res
173 lines (114 loc) · 2.44 KB
/
Hello.res
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
let someLongName = 10
let otherLongName = "string"
let x = {"a": 3}
let r = Other.something
let l = More.inner + More.n + Other.inner
let n = More.n
let _ = More.party
let _ = string_of_bool
/* let m = {More.a: 2, b: 32.}; */
module Something = {
open Other
let m = {name: "Me", age: 0}
let animal = Things(10)
let other = Things(2)
let me: animals = People("Hie")
let x = something + 10
let r = m.name
let awesome = 20
if true {
()
}
}
open! Something
let y = x + 10
switch me {
| Things(n) => ()
| _ => ()
}
let z = x * x
let aThing = 10 + Other.something
@ocaml.doc(" Some docs about this **awesome** thing. ")
let awesome =
100 + m.age
let thing = "thing"
let transform = (x, y) => x ++ Js.Float.toString(y)
let z = transform("hello ", 5.)
let zzz = 1
let more = 20
@ocaml.doc(" Something here ")
let added =
10 + awesome
open Other
open Hashtbl
@ocaml.doc(" Some more documentation about this ")
let awesome = x => x + 2
let a = list{"hello", "my fine" ++ "folks", "in boonville"}
let div = (~x, ~y, ~children, ()) => 10
let m = <div x="10" y="20" />
let something = animal =>
switch animal {
| blank => ()
}
something(animal)
let someFunction = (memorableName, {contents}) => {
let innerMemorable = 20
memorableName + innerMemorable
}
/* let awesome = 10000; */
/* let awesome = 111; */
let z = 10
let z = find
let z = later
let m = Other.later
for _index in 0 to 10 {
print_endline("hellO")
}
module OneOneOneOne = {
module TwoTwoTwoTwo = {
let xxxxxxxxxx = 10
}
}
let r = OneOneOneOne.TwoTwoTwoTwo.xxxxxxxxxx
type awesome = {
one: string,
two: float,
}
open OneOneOneOne.TwoTwoTwoTwo
include OneOneOneOne.TwoTwoTwoTwo
include More
let _ = Other.oo.person.name
type lots =
| Parties
| Plutocrats(int, float)
| Possums
| Oppossums
let y = Some(10 + awesome(3))
let z = {contents: 30}
let party = {one: "one", two: 2.}
let {one, two} = party
let thing = () => 34 + 43
type more = awesome
let {contents} = z
switch y {
| Some(u) => ()
| None => ()
}
/* let x = [%raw " hello"]; */
let awesome = "hello"
type shortReference = (string, list<string>, string)
type reference = {
uri: string,
moduleName: string,
modulePath: list<string>,
name: string,
}
type typeSource =
| Builtin(string)
| Public(reference)
| NotFound
type lockfile = {
version: int,
pastVersions: Belt.HashMap.Int.t<list<(shortReference, int)>>,
current: list<(shortReference, int)>,
}