Skip to content

Instantly share code, notes, and snippets.

@kogai
Created December 23, 2017 04:00
Show Gist options
  • Save kogai/af6d272fddf526e9b2663da9986f39cc to your computer and use it in GitHub Desktop.
Save kogai/af6d272fddf526e9b2663da9986f39cc to your computer and use it in GitHub Desktop.
let open Printf in
let open Ast in
let open Eval.Environment in
let x = empty in
let inf = create_info "file" 0 0 in
set x (TermVar (inf, "x")) "my-x";
set x (TermVar (inf, "y")) "my-y";
printf "%s\n" @@ show x;
let y = create (Some x) in
set y (TermVar (inf, "x")) "my-x";
set y (TermVar (inf, "y")) "my-y";
printf "%s\n" @@ show y;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment