···11-module SymbolAtom: SExpFunc.ATOM with type t = string = {
11+type t = string
22+module Atom = {
23 type t = string
34 type subst = Map.t<int, string>
45 let unify = (a, b, ~gen as _=?) =>
···2223 let upshift = (t, _, ~from as _=?) => t
2324}
24252525-include SExpFunc.Make(SymbolAtom)
2626+module AtomView = {
2727+ type props = {name: string, scope: array<string>}
2828+ let make = (props: props) => React.string(props.name)
2929+}
-3
src/SExp.resi
···11-module SymbolAtom: SExpFunc.ATOM with type t = string
22-33-include module type of SExpFunc.Make(SymbolAtom)
···11-// really feel like this shouldn't be necessary...
22-module SExpJ: Signatures.JUDGMENT with module Term := SExp and type t = SExp.t
33-44-include Signatures.JUDGMENT_VIEW with module Term := SExp and module Judgment := SExpJ
-6
src/SExpView.res
···11-module SymbolAtomView: SExpViewFunc.ATOM_VIEW with module Atom := SExp.SymbolAtom = {
22- type props = {name: string, scope: array<string>}
33- let make = (props: props) => React.string(props.name)
44-}
55-66-include SExpViewFunc.Make(SExp.SymbolAtom, SymbolAtomView, SExp)
-3
src/SExpView.resi
···11-module SymbolAtomView: SExpViewFunc.ATOM_VIEW with module Atom := SExp.SymbolAtom
22-33-include Signatures.TERM_VIEW with module Term := SExp
···2424 let parseMeta: string => result<(meta, string), string>
2525 let prettyPrint: (t, ~scope: array<meta>) => string
2626 let prettyPrintMeta: meta => string
2727+ // will unifying t with a term give meaningful substitutions?
2728 let concrete: t => bool
2829}
2930···4041 let mapTerms: (t, Term.t => Term.t) => t
4142 let parse: (string, ~scope: array<Term.meta>, ~gen: Term.gen=?) => result<(t, string), string>
4243 let prettyPrint: (t, ~scope: array<Term.meta>) => string
4343- // will unifying t with a term give meaningful substitutions?
4444 let concrete: t => bool
4545}
4646
···11+type rec piece =
22+ | String(string)
33+ | Var({idx: int})
44+ | Schematic({schematic: int, allowed: array<int>})
55+type t = array<piece>
66+77+module Atom: SExpFunc.ATOM with type t = t
88+module AtomView: SExpViewFunc.ATOM_VIEW with module Atom := Atom
···11-type stringSExpAtom = StringS(StringAtom.t) | ConstS(string)
22-module StringSExpAtom: SExpFunc.ATOM with type t = stringSExpAtom
33-44-include module type of SExpFunc.Make(StringSExpAtom)
-18
src/StringSExpJView.res
···11-module StringAtomView: SExpViewFunc.ATOM_VIEW with module Atom := StringSExp.StringSExpAtom = {
22- type props = {name: StringSExp.StringSExpAtom.t, scope: array<string>}
33- let make = ({name, scope}: props) =>
44- switch name {
55- | StringSExp.StringS(name) => <StringAtomView name scope />
66- | StringSExp.ConstS(name) => <SExpView.SymbolAtomView name scope />
77- }
88-}
99-1010-module StringSExpJ = StringSExp
1111-module View = SExpViewFunc.Make(StringSExp.StringSExpAtom, StringAtomView, StringSExp)
1212-1313-module TermView = View
1414-type props = {
1515- judgment: StringSExp.t,
1616- scope: array<string>,
1717-}
1818-let make = ({judgment, scope}) => View.make({term: judgment, scope})
-3
src/StringSExpJView.resi
···11-module StringSExpJ: Signatures.JUDGMENT with module Term := StringSExp and type t = StringSExp.t
22-33-include Signatures.JUDGMENT_VIEW with module Term := StringSExp and module Judgment := StringSExpJ
···11+type t = StringS(StringA.Atom.t) | ConstS(string)
22+module Atom: SExpFunc.ATOM with type t = t
33+module AtomView: SExpViewFunc.ATOM_VIEW with module Atom := Atom
+3
src/Symbolic.resi
···11+type t = string
22+module Atom: SExpFunc.ATOM with type t = t
33+module AtomView: SExpViewFunc.ATOM_VIEW with module Atom := Atom
+12
src/TermViewAsJudgmentView.res
···11+module Make = (
22+ Term: Signatures.TERM,
33+ Judgment: Signatures.JUDGMENT with module Term := Term and type t = Term.t,
44+ TermView: Signatures.TERM_VIEW with module Term := Term,
55+): (Signatures.JUDGMENT_VIEW with module Term := Term and module Judgment := Judgment) => {
66+ module TermView = TermView
77+ type props = {
88+ judgment: Judgment.t,
99+ scope: array<Term.meta>,
1010+ }
1111+ let make = ({judgment, scope}) => TermView.make({term: judgment, scope})
1212+}