This commit is contained in:
Pierre-Emmanuel Wulfman 2020-04-20 14:53:13 +02:00
parent d0d495ccce
commit 7bcf706fcc
3 changed files with 27 additions and 0 deletions

3
src/environment/bool.ml Normal file
View File

@ -0,0 +1,3 @@
open Ast_typed
let environment = env_sum_type ~type_name:(Var.of_name "bool") @@ [(Constructor "true",t_unit ());(Constructor "false",t_unit ())]

13
src/environment/dune Normal file
View File

@ -0,0 +1,13 @@
(library
(name environment)
(public_name ligo.environment)
(libraries
simple-utils
tezos-utils
ast_typed
)
(preprocess
(pps ppx_let bisect_ppx --conditional)
)
(flags (:standard -open Simple_utils))
)

View File

@ -0,0 +1,11 @@
open Ast_typed
let merge e1 e2 =
let e1 = List.Ne.to_list e1 in
let e2 = List.Ne.to_list e2 in
List.Ne.of_list @@ e1 @ e2
let default = Environment.full_empty
let default = merge default Bool.environment