···11-21type rec t =
33- Symbol({name: string })
44- | Compound({subexps: array<t>})
55- | Var({idx:int})
66- | Schematic({schematic:int, allowed: array<int>})
22+ | Symbol({name: string})
33+ | Compound({subexps: array<t>})
44+ | Var({idx: int})
55+ | Schematic({schematic: int, allowed: array<int>})
7688-include Signatures.TERM with
99- type t := t and
1010- type meta = string and
1111- type schematic = int and
1212- type subst = Map.t<int,t>77+include Signatures.TERM
88+ with type t := t
99+ and type meta = string
1010+ and type schematic = int
1111+ and type subst = Map.t<int, t>
···11- include Signatures.JUDGMENT_VIEW with module Term := SExp and module Judgment := SExp11+include Signatures.JUDGMENT_VIEW with module Term := SExp and module Judgment := SExp
···11-21module type TERM = {
32 type t
43 type schematic
54 type meta
66- type subst = Map.t<schematic,t>
77- let substitute : (t, subst) => t
88- let unify : (t, t) => array<subst>
55+ type subst = Map.t<schematic, t>
66+ let substitute: (t, subst) => t
77+ let unify: (t, t) => array<subst>
98 // law: unify(a,b) == [{}] iff equivalent(a,b)
1010- let equivalent : (t, t) => bool
1111- let substDeBruijn : (t, array<t>, ~from:int=?) => t
1212- let upshift : (t, int, ~from:int=?) => t
99+ let equivalent: (t, t) => bool
1010+ let substDeBruijn: (t, array<t>, ~from: int=?) => t
1111+ let upshift: (t, int, ~from: int=?) => t
1312 type gen
1414- let fresh : (gen, ~replacing:meta=?) => schematic
1515- let seen : (gen, schematic) => ()
1616- let place : (schematic, ~scope: array<meta>) => t
1717- let makeGen : () => gen
1818- let parse : (string, ~scope: array<meta>, ~gen: gen=?) => result<(t,string),string>
1919- let parseMeta : (string) => result<(meta,string),string>
2020- let prettyPrint : (t, ~scope: array<meta>) => string
2121- let prettyPrintMeta : (meta) => string
1313+ let fresh: (gen, ~replacing: meta=?) => schematic
1414+ let seen: (gen, schematic) => unit
1515+ let place: (schematic, ~scope: array<meta>) => t
1616+ let makeGen: unit => gen
1717+ let parse: (string, ~scope: array<meta>, ~gen: gen=?) => result<(t, string), string>
1818+ let parseMeta: string => result<(meta, string), string>
1919+ let prettyPrint: (t, ~scope: array<meta>) => string
2020+ let prettyPrintMeta: meta => string
2221}
23222423module type JUDGMENT = {
2525- module Term : TERM
2424+ module Term: TERM
2625 type t
2727- let substitute : (t, Term.subst) => t
2828- let equivalent : (t,t) => bool
2929- let unify : (t, t) => array<Term.subst>
3030- let substDeBruijn : (t, array<Term.t>, ~from:int=?) => t
3131- let upshift : (t, int, ~from:int=?) => t
3232- let parse : (string, ~scope: array<Term.meta>, ~gen: Term.gen=?) => result<(t,string),string>
3333- let prettyPrint : (t, ~scope: array<Term.meta>) => string
2626+ let substitute: (t, Term.subst) => t
2727+ let equivalent: (t, t) => bool
2828+ let unify: (t, t) => array<Term.subst>
2929+ let substDeBruijn: (t, array<Term.t>, ~from: int=?) => t
3030+ let upshift: (t, int, ~from: int=?) => t
3131+ let parse: (string, ~scope: array<Term.meta>, ~gen: Term.gen=?) => result<(t, string), string>
3232+ let prettyPrint: (t, ~scope: array<Term.meta>) => string
3433}
3535-36343735module type TERM_VIEW = {
3838- module Term : TERM
3636+ module Term: TERM
3937 type props = {term: Term.t, scope: array<Term.meta>}
4040- let make : props => React.element
4141- let makeMeta : Term.meta => React.element
3838+ let make: props => React.element
3939+ let makeMeta: Term.meta => React.element
4240}
43414442module type JUDGMENT_VIEW = {
4545- module Term : TERM
4646- module Judgment : JUDGMENT with module Term := Term;
4747- module TermView : TERM_VIEW with module Term := Term;
4343+ module Term: TERM
4444+ module Judgment: JUDGMENT with module Term := Term
4545+ module TermView: TERM_VIEW with module Term := Term
4846 type props = {judgment: Judgment.t, scope: array<Term.meta>}
4949- let make : props => React.element
5050-}
5151-5252-4747+ let make: props => React.element
4848+}