aboutsummaryrefslogtreecommitdiff
path: root/new-luxc/source/luxc/lang/synthesis.lux
blob: ad31d01385806a96e094d0bd729d293b7ee4fc28 (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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
(;module:
  lux)

(def: #export Arity Nat)
(def: #export Register Nat)
(def: #export Variable Int)

(type: #export (Path' s)
  #UnitP
  (#BoolP Bool)
  (#NatP Nat)
  (#IntP Int)
  (#DegP Deg)
  (#RealP Real)
  (#TextP Text)
  (#VariantP (Either Nat Nat) (Path' s))
  (#TupleP (Either Nat Nat) (Path' s))
  (#BindP Nat)
  (#AltP (Path' s) (Path' s))
  (#SeqP (Path' s) (Path' s))
  (#ExecP s))

(type: #export #rec Synthesis
  #Unit
  (#Bool Bool)
  (#Nat Nat)
  (#Int Int)
  (#Deg Deg)
  (#Real Real)
  (#Text Text)
  (#Variant Nat Bool Synthesis)
  (#Tuple (List Synthesis))
  (#Case Synthesis (Path' Synthesis))
  (#Function Arity (List Variable) Synthesis)
  (#Call Synthesis (List Synthesis))
  (#Recur (List Synthesis))
  (#Procedure Text (List Synthesis))
  (#Variable Variable)
  (#Definition Ident)
  (#Let Register Synthesis Synthesis)
  (#If Synthesis Synthesis Synthesis)
  (#Loop Register (List Synthesis) Synthesis))

(type: #export Path (Path' Synthesis))