Source file options.ml

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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
type target_lang =
  | Ligo
  | SmartPy
  | Whyml
  | Markdown
  | Ocaml
  | None
[@@deriving show {with_path = false}]

type storage_policy =
  | Record
  | Flat
  | Hybrid of (string * string) list
[@@deriving show {with_path = false}]

type execution_mode =
  | WithSideEffect
  | WithoutSideEffect
[@@deriving show {with_path = false}]

type sorting_policy =
  | OnTheFly
  | OnChange
  | None
[@@deriving show {with_path = false}]

let version = "0.1.6"
let url = "https://archetype-lang.org/"

let target = ref (None : target_lang)

let storage_policy = ref Record
let execution_mode = ref WithSideEffect
let sorting_policy = ref OnTheFly


let opt_lsp     = ref false
let opt_service = ref false
let opt_json    = ref false
let opt_pt      = ref false
let opt_ext     = ref false
let opt_ast     = ref false
let opt_typed   = ref false
let opt_all_parenthesis = ref false
let opt_nse   = ref false
let opt_sa    = ref false
let opt_skv   = ref false
let opt_raw   = ref false
let opt_raw_whytree = ref false

let opt_property_focused = ref ""

(* let opt_pre_json = ref false
   let opt_pre_pretty_print = ref false
   let opt_pre_parse = ref false
   let opt_astr = ref false
   let opt_model = ref false
   let opt_raw_model = ref false
   let opt_sa = ref false
   let opt_api = ref false
   let opt_cwse = ref false
   let debug_mode = ref false *)

let opt_vids : (string list) ref = ref []
let add_vids s =
  opt_vids := s::!opt_vids