···147147 ->Array.filterMap(((key, rule)) => {
148148 let insts = rule->Rule.genSchemaInsts(gen, ~scope=ctx.fixes)
149149 let res = rule->Rule.instantiate(insts)
150150- let ghostSubs = Judgment.unify(Judgment.ghostTerm, res.conclusion)
151151- if ghostSubs->Seq.head->Option.isNone {
150150+ if !Judgment.unifiesWithAnything(res.conclusion) {
152151 Some((key, res, insts))
153152 } else {
154153 None
+1
src/SExp.res
···1919 let lowerSchematic = (_, _) => ""
2020 let ghost = ""
2121 let substDeBruijn = (name, _, ~from as _) => name
2222+ let unifiesWithAnything = _ => false
2223}
23242425include SExpFunc.Make(ConstSymbol)
+8
src/SExpFunc.res
···1010 let lowerSchematic: (int, array<int>) => t
1111 let ghost: t
1212 let substDeBruijn: (t, array<t>, ~from: int) => t
1313+ let unifiesWithAnything: t => bool
1314}
14151516module IntCmp = Belt.Id.MakeComparable({
···426427 }
427428428429 let ghostTerm = Ghost
430430+ let rec unifiesWithAnything = t =>
431431+ switch t {
432432+ | Schematic(_) => true
433433+ | Symbol(s) => Symbol.unifiesWithAnything(s)
434434+ | Compound({subexps}) => subexps->Array.every(unifiesWithAnything)
435435+ | _ => false
436436+ }
429437 let mapTerms = (t, f) => f(t)
430438}
+2-1
src/Signatures.res
···2525 let prettyPrint: (t, ~scope: array<meta>) => string
2626 let prettyPrintMeta: meta => string
2727 let ghostTerm: t
2828+ let unifiesWithAnything: t => bool
2829}
29303031module type JUDGMENT = {
···3738 let reduce: t => t
3839 let upshift: (t, int, ~from: int=?) => t
3940 // Map a function over all terms in the judgment
4040- // NOTE(josh): we should return to whether this is necessary.
4141 let mapTerms: (t, Term.t => Term.t) => t
4242 let parse: (string, ~scope: array<Term.meta>, ~gen: Term.gen=?) => result<(t, string), string>
4343 let prettyPrint: (t, ~scope: array<Term.meta>) => string
4444 let ghostTerm: t
4545+ let unifiesWithAnything: t => bool
4546}
46474748module type TERM_VIEW = {