diff options
Diffstat (limited to 'ocaml/lib/nock_alt.ml')
-rw-r--r-- | ocaml/lib/nock_alt.ml | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/ocaml/lib/nock_alt.ml b/ocaml/lib/nock_alt.ml index 037c0d0..7b38387 100644 --- a/ocaml/lib/nock_alt.ml +++ b/ocaml/lib/nock_alt.ml @@ -27,18 +27,18 @@ open Noun *) let rec nock_on bus fol = match fol with - | Cell (hib, gal) when is_cell hib -> + | Cell { h = hib; t = gal; _ } when is_cell hib -> (* [a b] -> compute both sides and cons *) let poz = nock_on bus hib in let riv = nock_on bus gal in cell poz riv - | Cell (Atom op, gal) -> + | Cell { h = Atom { z = op; _ }; t = gal; _ } -> (match Z.to_int op with | 0 -> (* /[axis subject] - slot/fragment lookup *) if not (is_atom gal) then raise Exit - else slot (match gal with Atom n -> n | _ -> raise Exit) bus + else slot (match gal with Atom { z = n; _ } -> n | _ -> raise Exit) bus | 1 -> (* =[constant subject] - return constant *) @@ -82,8 +82,8 @@ let rec nock_on bus fol = let tys = nock_on bus b_gal in let nex = match tys with - | Atom n when Z.equal n Z.zero -> c_gal - | Atom n when Z.equal n Z.one -> d_gal + | Atom { z = n; _ } when Z.equal n Z.zero -> c_gal + | Atom { z = n; _ } when Z.equal n Z.one -> d_gal | _ -> raise Exit in nock_on bus nex @@ -113,7 +113,7 @@ let rec nock_on bus fol = if not (is_atom b_gal) then raise Exit; let seb = nock_on bus c_gal in - let nex = slot (match b_gal with Atom n -> n | _ -> raise Exit) seb in + let nex = slot (match b_gal with Atom { z = n; _ } -> n | _ -> raise Exit) seb in nock_on seb nex | 10 -> |