A Term is one of:
Lam String Term
App Term Term
Kind of a path into a term, focusing on something kind of...
data Found a
If you looked for something in a Term, this like,
Found TermPath a
lamStep :: String -> TermPath -> TermPath
For building TermPath with a Lam in it.
funStep :: Term -> TermPath -> TermPath
For building TermPath with an App in it.
(Step into function part.)
argStep :: Term -> TermPath -> TermPath
For building TermPath with another App in it.
(Step into argument part.)
emptyTermPath :: TermPath
A TermPath that doesn't have a ton of stuff in it.s
findTerm :: forall a. (Term -> Maybe a) -> Term -> Maybe (Found a)
For looking for stuff in a Term. Maybe you'll find.
fillTerm :: TermPath -> Term -> Term
So uh a TermPath is kind of like a Term except it's missing a Term.
So if you have a Term for it, you can get a Term.
Term. Term Term Term.