#Term Source

data Term

A Term is one of:

  • a Variable with a name
  • a Lambda abstraction with a parameter name and a body Term
  • a function Application with a function Term and an arugment Term



#TermPath Source

data TermPath

Kind of a path into a term, focusing on something kind of...

#Found Source

data Found a

If you looked for something in a Term, this like,

  1. where you found it and
  2. what you found


#lamStep Source

lamStep :: String -> TermPath -> TermPath

For building TermPath with a Lam in it.

#funStep Source

funStep :: Term -> TermPath -> TermPath

For building TermPath with an App in it. (Step into function part.)

#argStep Source

argStep :: Term -> TermPath -> TermPath

For building TermPath with another App in it. (Step into argument part.)

#emptyTermPath Source

emptyTermPath :: TermPath

A TermPath that doesn't have a ton of stuff in it.s

#findTerm Source

findTerm :: forall a. (Term -> Maybe a) -> Term -> Maybe (Found a)

For looking for stuff in a Term. Maybe you'll find.

#fillTerm Source

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.