aboutsummaryrefslogtreecommitdiff
path: root/new-luxc/source/luxc/lang/translation/python/primitive.jvm.lux
blob: f1cf731a23cc7749870a21b6570d33b9bf590ae6 (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
(.module:
  lux
  (lux [macro "meta/" Monad<Meta>])
  (luxc (lang (host [python #+ Expression Statement]))))

(def: #export translate-bool
  (-> Bool (Meta Expression))
  (|>> python.bool meta/wrap))

(def: #export translate-int
  (-> Int (Meta Expression))
  (|>> python.int meta/wrap))

(def: #export translate-nat
  (-> Nat (Meta Expression))
  (|>> (:coerce Int) python.int meta/wrap))

(def: #export translate-deg
  (-> Deg (Meta Expression))
  (|>> (:coerce Int) python.int meta/wrap))

(def: #export translate-frac
  (-> Frac (Meta Expression))
  (|>> python.float meta/wrap))

(def: #export translate-text
  (-> Text (Meta Expression))
  (|>> python.string meta/wrap))