knave-expand 0.14.22

The reading, scoping and expansion stages of knave
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use crate::diagnostic::Diagnostic;
use crate::reader::{Form, Symbol};
use crate::source::Span;

pub trait DefinitionQueries {
    fn definition_symbol(
        &self,
        term: &Symbol,
        name: String,
        span: Span,
    ) -> Result<Symbol, Diagnostic>;
    fn type_definition_symbol(&self, term: &Symbol, name: String) -> Symbol;
    fn definition_call(&self, term: &Symbol, span: Span) -> Result<Option<Form>, Diagnostic>;
    fn type_definition_call(&self, term: &Symbol) -> Option<Form>;
}