@@ -23,6 +23,7 @@ type expr =
2323  | Symbol  of  string 
2424  | Var  of  ident 
2525  | List  of  expr  list 
26+ [@@ derive eq ]
2627
2728let  primitive =  String. append " %" 
2829
@@ -73,14 +74,6 @@ let rec expand_macro : Raw.t -> expr = function
7374    List. fold_left t ~init: (expand_macro h) ~f: (fun  acc  e  ->
7475      List  [ expand_macro e; acc ] )
7576
76- let  rec  equal_expr  x  y  = 
77-   match  (x, y) with 
78-   |  Var  x1 , Var  x2  |  Symbol  x1 , Symbol  x2  -> equal_string x1 x2
79-   |  List  es1 , List  es2  -> begin 
80-     try  List. for_all2_exn es1 es2 ~f: equal_expr with  _  ->  false 
81-   end 
82-   |  _  -> false 
83- 
8477let  rec  replace_id  (xfrom  : ident ) xto  e  = 
8578  match  e with 
8679  |  Var  x  when  equal_string x xfrom -> xto
@@ -151,30 +144,31 @@ let rec raylist_of_expr (e : expr) : ray list =
151144    ray_of_expr h :: raylist_of_expr t
152145  |  e  -> failwith (" error: unhandled star " ^  to_string e)
153146
154- let  rec  star_of_expr  : expr -> marked_star   =  function 
147+ let  rec  star_of_expr  : expr -> Marked.star   =  function 
155148  |  List  [ Symbol  k; s ] when  equal_string k focus_op ->
156-     star_of_expr s |>  Lsc_ast. remove_mark  |>  Lsc_ast. mark 
149+     star_of_expr s |>  Marked. remove  |>  Marked. make_state 
157150  |  List  [ Symbol  k; s; List  ps ] when  equal_string k params_op ->
158-     Unmarked  { content =  raylist_of_expr s; bans =  bans_of_expr ps }
159-   |  e  -> Unmarked  { content =  raylist_of_expr e; bans =  []  }
151+     Action  { content =  raylist_of_expr s; bans =  bans_of_expr ps }
152+   |  e  -> Action  { content =  raylist_of_expr e; bans =  []  }
160153
161- let  rec  constellation_of_expr  : expr -> marked_constellation  =  function 
162-   |  Symbol  k  when  equal_string k nil_op -> [] 
163-   |  Symbol  s  -> [ Unmarked  { content =  [ var (s, None ) ]; bans =  []  } ]
164-   |  Var  x  -> [ Unmarked  { content =  [ var (x, None ) ]; bans =  []  } ]
154+ let  rec  constellation_of_expr  : expr -> Marked.constellation  =  function 
155+   |  Symbol  s  -> [ Action  { content =  [ var (s, None ) ]; bans =  []  } ]
156+   |  Var  x  -> [ Action  { content =  [ var (x, None ) ]; bans =  []  } ]
165157  |  List  [ Symbol  s; h; t ] when  equal_string s cons_op ->
166158    star_of_expr h :: constellation_of_expr t
167-   |  List  g  -> [ Unmarked  { content =  [ ray_of_expr (List  g) ]; bans =  []  } ]
159+   |  List  g  -> [ Action  { content =  [ ray_of_expr (List  g) ]; bans =  []  } ]
168160
169161(*  ---------------------------------------
170162   Stellogen expr of Expr 
171163   --------------------------------------- *)  
172164
173165let  rec  sgen_expr_of_expr  (e  : expr ) : sgen_expr  = 
174166  match  e with 
167+   |  Symbol  k  when  equal_string k nil_op ->
168+     Raw  [ Action  { content =  [] ; bans =  []  } ]
175169  (*  ray *) 
176170  |  Var  _  |  Symbol  _  ->
177-     Raw  [ Unmarked  { content =  [ ray_of_expr e ]; bans =  []  } ]
171+     Raw  [ Action  { content =  [ ray_of_expr e ]; bans =  []  } ]
178172  (*  star *) 
179173  |  List  (Symbol s  :: _ ) when  equal_string s params_op -> Raw  [ star_of_expr e ]
180174  |  List  (Symbol s  :: _ ) when  equal_string s cons_op -> Raw  [ star_of_expr e ]
@@ -188,10 +182,6 @@ let rec sgen_expr_of_expr (e : expr) : sgen_expr =
188182    Group  (List. map ~f: sgen_expr_of_expr gs)
189183  (*  process *) 
190184  |  List  (Symbol "process"  :: gs ) -> Process  (List. map ~f: sgen_expr_of_expr gs)
191-   (*  kill *) 
192-   |  List  [ Symbol  " kill" Kill  (sgen_expr_of_expr g)
193-   (*  clean *) 
194-   |  List  [ Symbol  " clean" Clean  (sgen_expr_of_expr g)
195185  (*  exec *) 
196186  |  List  [ Symbol  " exec" Exec  (false , sgen_expr_of_expr g)
197187  (*  linear exec *) 
0 commit comments