aboutsummaryrefslogtreecommitdiff
path: root/new-luxc/source/luxc/lang.lux
blob: 787895466e3a15fa7b0e9010f779e402a4a62de2 (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)

(type: #export (Pattern a) Void)

(type: #export Primitive
  #Unit
  (#Bool Bool)
  (#Nat Nat)
  (#Int Int)
  (#Deg Deg)
  (#Real Real)
  (#Char Char)
  (#Text Text))

(type: #export Reference
  (#Relative Ref)
  (#Absolute Ident))

(type: #export (Structure a)
  (#Variant Nat Bool a)
  (#Tuple (List a))
  (#Case (Pattern a))
  (#Function Scope a)
  (#Call a (List a))
  (#Procedure Text (List a)))

(type: #export (Analysis' Analysis)
  (#Primitive Primitive)
  (#Structure (Structure Analysis))
  (#Reference Reference))

(type: #export #rec Analysis
  (Meta [Type Cursor]
        (Analysis' Analysis)))

(type: #export Synthesis
  Unit)

(type: #export Eval
  (-> Type Code (Lux Top)))

(type: #export Analyser
  (-> Eval Code (Lux Analysis)))