aboutsummaryrefslogtreecommitdiff
path: root/new-luxc/test/test/luxc/common.lux
blob: 2e725be5d7c2ee75a8070569b7ac0a2f33fd076d (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
(;module:
  lux
  (lux (control pipe)
       ["r" math/random "r/" Monad<Random>]
       (data ["R" error])
       [meta]
       (meta [code])
       [io])
  (luxc ["&" base]
        [analyser]
        ["&;" host]))

(def: init-info
  Info
  {#;target  "JVM"
   #;version &;version
   #;mode    #;Build})

(def: init-type-context
  Type-Context
  {#;ex-counter +0
   #;var-counter +0
   #;var-bindings (list)})

(def: #export (init-compiler _)
  (-> Top Compiler)
  {#;info            init-info
   #;source          [dummy-cursor +0 ""]
   #;cursor          dummy-cursor
   #;modules         (list)
   #;scopes          (list)
   #;type-context    init-type-context
   #;expected        #;None
   #;seed            +0
   #;scope-type-vars (list)
   #;host            (:! Void (io;run &host;init-host))})