Kindelia
Kindelia copied to clipboard
Parser lhs
This PR:
- parse lhs in
Rule
structure as aVec<Term>
(only the args of rules are parsed now) - raises error if rule name is different of function name
closes #124
As this changes the serialization that is part of the prococol (here) — as I'm realizing now — I'm gonna cc @VictorTaelin to check if this is ok.
To clarify the problem:
We should have a type-safe Term::Fun
that can only ever stores small names (72-bit names that can be called directly). But the current Func
s are represented as a list of pairs (rules) (Term, Term)
and the LHS's would not be able to store big names (as it should be).
So we propose changing the Rule
type to be:
- a list of
Term
arguments, instead of an intireTerm::Func
— that would include it's name); - plus the
Term
body;
It's serialization as in here — on would only have to update the Whitebook.
So, actually, fun
s will name will be limited to 72-bits. Name
s will universally be limited to 72-bits. There would be no such thing as big names.