blob: 6e0a591d26dbf6221e12fd3a158c4a54ecc71a4a (
plain)
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
|
(.module:
[lux (#- nat int rev)
[control
monad]]
[//
["//." type]
["/." //
[//
["/" analysis (#+ Analysis Operation)]]]])
(do-template [<name> <type> <tag>]
[(def: #export (<name> value)
(-> <type> (Operation Analysis))
(do ///.monad
[_ (//type.infer <type>)]
(wrap (#/.Primitive (<tag> value)))))]
[bit Bit #/.Bit]
[nat Nat #/.Nat]
[int Int #/.Int]
[rev Rev #/.Rev]
[frac Frac #/.Frac]
[text Text #/.Text]
)
(def: #export unit
(Operation Analysis)
(do ///.monad
[_ (//type.infer Any)]
(wrap (#/.Primitive #/.Unit))))
|