Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

18 lines (11 sloc) 0.33 kB
(* Contexts *)
let lookup = List.assoc
let index x ctx =
let rec index k = function
| [] -> raise Not_found
| y :: ys -> if x = y then k else index (k+1) ys
in
index 0 ctx
let lookup_ty x ctx = fst (lookup x ctx)
let lookup_value x ctx = snd (lookup x ctx)
let extend x t ?value ctx = (x, (t, value)) :: ctx
Jump to Line
Something went wrong with that request. Please try again.