Beispiel #1
0
 public void Unify(free <type> t, int i)
 {
     if (Failed)
     {
         return;
     }
     _vars.Unify(Rule(t), User(i, Type(i)));
     if (_vars.Failed)
     {
         Error = GenerateError($"could not match {i} with inference rule type {t}", new[] { Source(i) });
     }
 }
Beispiel #2
0
 private type User(int i, free <type> free) => _userScopes[i].Unfree(free);
Beispiel #3
0
 private type Rule(free <type> free) => _ruleScope.Unfree(free);
Beispiel #4
0
 public static free <term> Canonicalize(this free <term> term)
 {
     return(free.Of(new Canonicalizer().Canonicalize(term.UnsafeValue)));
 }
Beispiel #5
0
 public static free <type> Canonicalize(this free <type> type)
 {
     return(free.Of(new Canonicalizer().Canonicalize(type.UnsafeValue)));
 }
        public term Unfree(free <term> fterm)
        {
            var val = fterm.UnsafeValue;

            return(Unfree(val));
        }