SYMBOL INDEX (1012 symbols across 65 files) FILE: 01_arith/src/lexer.rs type Token (line 8) | pub enum Token { type TokenSpan (line 27) | pub struct TokenSpan { type Target (line 33) | type Target = Token; method deref (line 34) | fn deref(&self) -> &Self::Target { type Lexer (line 40) | pub struct Lexer<'s> { function new (line 46) | pub fn new(input: Chars<'s>) -> Lexer<'s> { function peek (line 57) | fn peek(&mut self) -> Option { function consume (line 62) | fn consume(&mut self) -> Option { function consume_while (line 79) | fn consume_while bool>(&mut self, pred: F) -> Spanned Option { function keyword (line 106) | fn keyword(&mut self) -> Option { function eat (line 123) | fn eat(&mut self, ch: char, token: Token) -> Option { function lex (line 133) | fn lex(&mut self) -> Option { type Item (line 147) | type Item = TokenSpan; method next (line 148) | fn next(&mut self) -> Option { function valid (line 158) | fn valid() { function invalid (line 169) | fn invalid() { FILE: 01_arith/src/main.rs type RuntimeError (line 6) | pub enum RuntimeError { method is_numeric (line 11) | pub fn is_numeric(&self) -> bool { method is_normal (line 19) | pub fn is_normal(&self) -> bool { function eval1 (line 27) | pub fn eval1(t: Term) -> Result { function eval (line 63) | pub fn eval(t: Term) -> Term { function main (line 74) | fn main() { FILE: 01_arith/src/parser.rs type Term (line 7) | pub enum Term { type Parser (line 17) | pub struct Parser<'s> { function new (line 27) | pub fn new(input: &'s str) -> Parser<'s> { function consume (line 35) | fn consume(&mut self) -> Option { function expect (line 41) | fn expect(&mut self, token: Token) -> Option { function parse_paren (line 48) | fn parse_paren(&mut self) -> Option { function parse_if (line 54) | fn parse_if(&mut self) -> Option { function parse_term (line 63) | pub fn parse_term(&mut self) -> Option { function diagnostic (line 86) | pub fn diagnostic(self) -> Diagnostic<'s> { function baptize (line 92) | fn baptize(int: u32) -> Term { FILE: 02_lambda/src/context.rs type Context (line 4) | pub struct Context { method bind (line 9) | pub fn bind(&mut self, hint: String) -> (Context, usize) { method lookup (line 20) | pub fn lookup(&self, key: String) -> Option { method size (line 29) | pub fn size(&self) -> usize { FILE: 02_lambda/src/lexer.rs type Token (line 8) | pub enum Token { type Lexer (line 18) | pub struct Lexer<'s> { function new (line 24) | pub fn new(input: Chars<'s>) -> Lexer<'s> { function peek (line 35) | fn peek(&mut self) -> Option { function consume (line 40) | fn consume(&mut self) -> Option { function consume_while (line 57) | fn consume_while bool>(&mut self, pred: F) -> Spanned Option> { function lex (line 85) | fn lex(&mut self) -> Option> { type Item (line 98) | type Item = Spanned; method next (line 99) | fn next(&mut self) -> Option { FILE: 02_lambda/src/main.rs function shift1 (line 9) | fn shift1(d: isize, c: isize, tm: RcTerm) -> RcTerm { function shift (line 23) | fn shift(d: isize, tm: RcTerm) -> RcTerm { function subst_walk (line 27) | fn subst_walk(j: isize, s: RcTerm, c: isize, t: RcTerm) -> RcTerm { function subst (line 46) | fn subst(j: isize, s: RcTerm, tm: RcTerm) -> RcTerm { function term_subst_top (line 50) | fn term_subst_top(s: RcTerm, tm: RcTerm) -> RcTerm { function isval (line 54) | fn isval(_ctx: &Context, tm: RcTerm) -> bool { function eval1 (line 61) | fn eval1(ctx: &Context, tm: RcTerm) -> RcTerm { function main (line 82) | fn main() { FILE: 02_lambda/src/parser.rs type RcTerm (line 10) | pub struct RcTerm(pub Rc); method from (line 13) | fn from(term: Term) -> RcTerm { method fmt (line 19) | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { type Target (line 35) | type Target = Term; method deref (line 36) | fn deref(&self) -> &Self::Target { type Term (line 42) | pub enum Term { method fmt (line 25) | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { type Parser (line 48) | pub struct Parser<'s> { function new (line 59) | pub fn new(input: &'s str) -> Parser<'s> { function consume (line 68) | fn consume(&mut self) -> Option> { function expect (line 74) | fn expect(&mut self, token: Token) -> Option> { function peek (line 86) | fn peek(&mut self) -> Option { function lambda (line 90) | fn lambda(&mut self) -> Option { function term (line 121) | fn term(&mut self) -> Option { function application (line 131) | fn application(&mut self) -> Option { function atom (line 142) | fn atom(&mut self) -> Option { function parse_term (line 165) | pub fn parse_term(&mut self) -> Option { function ctx (line 169) | pub fn ctx(&self) -> &Context { function diagnostic (line 173) | pub fn diagnostic(self) -> Diagnostic<'s> { FILE: 03_typedarith/src/ast.rs type Type (line 5) | pub enum Type { type Term (line 11) | pub enum Term { type TyError (line 22) | pub enum TyError { function typing (line 26) | pub fn typing(tm: RcTerm) -> Result { type RcTerm (line 59) | pub struct RcTerm(pub Rc); method fmt (line 62) | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { method from (line 68) | fn from(term: Term) -> RcTerm { type Target (line 74) | type Target = Term; method deref (line 75) | fn deref(&self) -> &Self::Target { FILE: 03_typedarith/src/lexer.rs type Token (line 8) | pub enum Token { type TokenSpan (line 25) | pub struct TokenSpan { type Target (line 31) | type Target = Token; method deref (line 32) | fn deref(&self) -> &Self::Target { type Lexer (line 38) | pub struct Lexer<'s> { function new (line 44) | pub fn new(input: Chars<'s>) -> Lexer<'s> { function peek (line 55) | fn peek(&mut self) -> Option { function consume (line 60) | fn consume(&mut self) -> Option { function consume_while (line 77) | fn consume_while bool>(&mut self, pred: F) -> Spanned Option { function keyword (line 104) | fn keyword(&mut self) -> Option { function eat (line 121) | fn eat(&mut self, ch: char, token: Token) -> Option { function lex (line 131) | fn lex(&mut self) -> Option { type Item (line 145) | type Item = TokenSpan; method next (line 146) | fn next(&mut self) -> Option { function valid (line 156) | fn valid() { function invalid (line 167) | fn invalid() { FILE: 03_typedarith/src/main.rs function main (line 7) | fn main() { FILE: 03_typedarith/src/parser.rs type Parser (line 7) | pub struct Parser<'s> { function new (line 17) | pub fn new(input: &'s str) -> Parser<'s> { function consume (line 25) | fn consume(&mut self) -> Option { function expect (line 31) | fn expect(&mut self, token: Token) -> Option { function parse_paren (line 38) | fn parse_paren(&mut self) -> Option { function parse_if (line 44) | fn parse_if(&mut self) -> Option { function parse_term (line 53) | pub fn parse_term(&mut self) -> Option { function diagnostic (line 76) | pub fn diagnostic(self) -> Diagnostic<'s> { function baptize (line 82) | fn baptize(int: u32) -> Term { FILE: 04_stlc/src/eval.rs type Error (line 6) | pub enum Error { function subst (line 11) | fn subst(mut val: Term, body: &mut Term) { function value (line 17) | fn value(ctx: &Context, term: &Term) -> bool { function eval1 (line 33) | fn eval1(ctx: &Context, term: Term) -> Result, Error> { function eval (line 104) | pub fn eval(ctx: &Context, term: Term) -> Result { FILE: 04_stlc/src/lexer.rs type TokenKind (line 8) | pub enum TokenKind { type Token (line 43) | pub struct Token { method new (line 49) | pub const fn new(kind: TokenKind, span: Span) -> Token { type Lexer (line 55) | pub struct Lexer<'s> { function new (line 61) | pub fn new(input: Chars<'s>) -> Lexer<'s> { function peek (line 73) | fn peek(&mut self) -> Option { function consume (line 78) | fn consume(&mut self) -> Option { function consume_while (line 97) | fn consume_while bool>(&mut self, pred: F) -> (String, Sp... function consume_delimiter (line 114) | fn consume_delimiter(&mut self) { function number (line 119) | fn number(&mut self) -> Token { function keyword (line 129) | fn keyword(&mut self) -> Token { function eat (line 156) | fn eat(&mut self, ch: char, kind: TokenKind) -> Token { function lex (line 166) | pub fn lex(&mut self) -> Token { type Item (line 197) | type Item = Token; method next (line 198) | fn next(&mut self) -> Option { function valid (line 213) | fn valid() { function invalid (line 224) | fn invalid() { FILE: 04_stlc/src/main.rs function ev (line 12) | fn ev(ctx: &mut Context, term: Term) -> Result { function parse (line 34) | fn parse(ctx: &mut Context, input: &str) { function main (line 47) | fn main() { FILE: 04_stlc/src/parser.rs type DeBruijnIndexer (line 10) | pub struct DeBruijnIndexer { method push (line 15) | pub fn push(&mut self, hint: String) -> usize { method pop (line 25) | pub fn pop(&mut self) { method lookup (line 29) | pub fn lookup(&self, key: &str) -> Option { type Parser (line 39) | pub struct Parser<'s> { function new (line 50) | pub fn new(input: &'s str) -> Parser<'s> { function consume (line 59) | fn consume(&mut self) -> Option { function expect (line 65) | fn expect(&mut self, kind: TokenKind) -> Option { function expect_term (line 77) | fn expect_term(&mut self) -> Option> { function peek (line 88) | fn peek(&mut self) -> Option { function peek_span (line 92) | fn peek_span(&mut self) -> Span { function lambda (line 96) | fn lambda(&mut self) -> Option> { function let_expr (line 113) | fn let_expr(&mut self) -> Option> { function ty_record_field (line 125) | fn ty_record_field(&mut self) -> Option { function ty_atom (line 135) | fn ty_atom(&mut self) -> Option { function ty (line 173) | fn ty(&mut self) -> Option { function application (line 201) | fn application(&mut self) -> Option> { function ident (line 216) | fn ident(&mut self) -> Option { function record_field (line 228) | fn record_field(&mut self) -> Option { function record (line 241) | fn record(&mut self) -> Option> { function if_expr (line 251) | fn if_expr(&mut self) -> Option> { function atom (line 263) | fn atom(&mut self) -> Option> { function term (line 322) | fn term(&mut self) -> Option> { function parse_term (line 329) | pub fn parse_term(&mut self) -> Option> { function diagnostic (line 333) | pub fn diagnostic(self) -> Diagnostic<'s> { FILE: 04_stlc/src/term.rs type Field (line 6) | pub struct Field { type Term (line 18) | pub enum Term { method fmt (line 48) | fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { function record_access (line 38) | pub fn record_access(fields: &[Field], projection: &str) -> Option fmt::Result { type Record (line 14) | pub struct Record { type RecordField (line 21) | pub struct RecordField { type TypeError (line 49) | pub enum TypeError { type Context (line 65) | pub struct Context<'a> { function add (line 71) | pub fn add(&self, ty: Type) -> Context { function get (line 85) | pub fn get(&self, idx: usize) -> Option<&Type> { function type_of (line 95) | pub fn type_of(&self, term: &Term) -> Result { FILE: 04_stlc/src/visitor.rs type Visitor (line 5) | pub trait Visitor: Sized { method visit_var (line 6) | fn visit_var(&mut self, var: usize); method visit_abs (line 7) | fn visit_abs(&mut self, ty: Type, body: &Term); method visit_app (line 8) | fn visit_app(&mut self, t1: &Term, t2: &Term); method visit_if (line 9) | fn visit_if(&mut self, guard: &Term, csq: &Term, alt: &Term); method visit_let (line 10) | fn visit_let(&mut self, bind: &Term, body: &Term); method visit_succ (line 11) | fn visit_succ(&mut self, t: &Term); method visit_pred (line 12) | fn visit_pred(&mut self, t: &Term); method visit_iszero (line 13) | fn visit_iszero(&mut self, t: &Term); method visit_const (line 14) | fn visit_const(&mut self, c: &Term); method visit_record (line 15) | fn visit_record(&mut self, c: &[Field]); method visit_proj (line 16) | fn visit_proj(&mut self, c: &Term, proj: &str); method visit_typedecl (line 17) | fn visit_typedecl(&mut self, name: &str, ty: &Type); type MutVisitor (line 20) | pub trait MutVisitor: Sized { method visit_var (line 21) | fn visit_var(&mut self, var: &mut Term) {} method visit_abs (line 23) | fn visit_abs(&mut self, ty: &mut Type, body: &mut Term) { method visit_app (line 26) | fn visit_app(&mut self, t1: &mut Term, t2: &mut Term) { method visit_if (line 30) | fn visit_if(&mut self, guard: &mut Term, csq: &mut Term, alt: &mut Ter... method visit_let (line 35) | fn visit_let(&mut self, bind: &mut Term, body: &mut Term) { method visit_succ (line 39) | fn visit_succ(&mut self, t: &mut Term) { method visit_pred (line 42) | fn visit_pred(&mut self, t: &mut Term) { method visit_iszero (line 45) | fn visit_iszero(&mut self, t: &mut Term) { method visit_const (line 48) | fn visit_const(&mut self, t: &mut Term) {} method visit_record (line 49) | fn visit_record(&mut self, c: &mut [Field]) { method visit_proj (line 54) | fn visit_proj(&mut self, t: &mut Term, proj: &mut String) { method visit_typedecl (line 57) | fn visit_typedecl(&mut self, name: &mut String, ty: &mut Type) {} method visit_term (line 59) | fn visit_term(&mut self, term: &mut Term) { method visit_var (line 108) | fn visit_var(&mut self, var: &mut Term) { method visit_abs (line 124) | fn visit_abs(&mut self, ty_: &mut Type, body: &mut Term) { method visit_let (line 130) | fn visit_let(&mut self, bind: &mut Term, body: &mut Term) { method visit_var (line 151) | fn visit_var(&mut self, var: &mut Term) { method visit_abs (line 160) | fn visit_abs(&mut self, ty_: &mut Type, body: &mut Term) { method visit_let (line 166) | fn visit_let(&mut self, bind: &mut Term, body: &mut Term) { function walk_mut_term (line 64) | fn walk_mut_term(visitor: &mut V, var: &mut Term) { type Direction (line 81) | pub enum Direction { type Shifting (line 87) | pub struct Shifting { method new (line 102) | pub fn new(direction: Direction) -> Self { method default (line 93) | fn default() -> Self { type Substitution (line 139) | pub struct Substitution { method new (line 145) | pub fn new(term: Term) -> Substitution { FILE: 05_recon/src/disjoint.rs type SetElement (line 7) | struct SetElement { type DisjointSet (line 13) | pub struct DisjointSet { method default (line 19) | fn default() -> Self { type Element (line 28) | pub struct Element(usize); type Choice (line 30) | pub enum Choice { function new (line 36) | pub fn new() -> DisjointSet { function singleton (line 43) | pub fn singleton(&mut self, data: T) -> Element { function find_set (line 55) | fn find_set(&self, id: usize) -> usize { function find_repr (line 76) | pub fn find_repr(&self, element: Element) -> Element { function data (line 80) | pub fn data(&self, element: Element) -> Option<&T> { function find (line 84) | pub fn find(&self, element: Element) -> &T { function union (line 92) | pub fn union T>(&mut self, f: F, a: Element, b: Element) { function partition (line 124) | pub fn partition(&self) -> Vec<&T> { type Variable (line 137) | type Variable = Element; type Unification (line 140) | pub enum Unification { method is_var (line 146) | fn is_var(&self) -> bool { type Unifier (line 155) | pub struct Unifier { method new (line 161) | pub fn new() -> Unifier { method occurs_check (line 168) | pub fn occurs_check(&self, v: TypeVar, u: &Unification) -> bool { method decode (line 175) | pub fn decode(&self, uni: &Unification) -> Type { method intern (line 184) | pub fn intern(&mut self, ty: Type) -> Variable { method var_bind (line 201) | fn var_bind(&mut self, v: TypeVar, v_: Variable, u: &Unification, u_: ... method subst (line 216) | pub fn subst(&self) -> HashMap { method unify (line 230) | pub fn unify(&mut self, a_: Variable, b_: Variable) -> Result<(), Stri... function solve (line 266) | pub fn solve>(iter: I) -> Result) -> std::fmt::Result { FILE: 05_recon/src/main.rs type Term (line 11) | pub enum Term { type TypedTerm (line 23) | pub enum TypedTerm { method subst (line 201) | fn subst(self, s: &HashMap) -> TypedTerm { type SystemF (line 35) | pub struct SystemF { method new (line 56) | fn new(expr: TypedTerm, ty: Type) -> SystemF { method de (line 60) | fn de(self) -> (TypedTerm, Type) { method subst (line 214) | fn subst(self, s: &HashMap) -> SystemF { type Constraint (line 40) | pub enum Constraint { type Elaborator (line 47) | struct Elaborator { method fresh (line 66) | fn fresh(&mut self) -> TypeVar { method ftv (line 72) | fn ftv(&self) -> HashSet { method get_scheme (line 80) | fn get_scheme(&self, index: usize) -> Option<&Scheme> { method generalize (line 89) | fn generalize(&mut self, ty: Type) -> Scheme { method instantiate (line 99) | fn instantiate(&mut self, scheme: Scheme) -> Type { method push (line 114) | fn push(&mut self, ty: (Type, Type)) { method elaborate (line 120) | fn elaborate(&mut self, term: &Term) -> SystemF { function main (line 222) | fn main() { FILE: 05_recon/src/mutation/mod.rs type TypeVar (line 9) | pub struct TypeVar { type Type (line 15) | pub enum Type { method ftv (line 51) | fn ftv(&self, rank: usize) -> HashSet { method apply (line 78) | fn apply(self, map: &HashMap) -> Type { method arrow (line 90) | pub fn arrow(a: Type, b: Type) -> Type { method bool (line 94) | pub fn bool() -> Type { method de_arrow (line 98) | pub fn de_arrow(&self) -> (&Type, &Type) { type Scheme (line 21) | pub enum Scheme { type TypedTerm (line 27) | pub enum TypedTerm { type SystemF (line 39) | pub struct SystemF { method new (line 45) | fn new(expr: TypedTerm, ty: Type) -> SystemF { function occurs_check (line 106) | pub fn occurs_check(v: &TypeVar, ty: &Type) -> bool { function var_bind (line 125) | fn var_bind(v: &TypeVar, ty: &Type) -> Result<(), String> { function unify_type (line 134) | fn unify_type(a: &Type, b: &Type) -> Result<(), String> { type Elaborator (line 160) | pub struct Elaborator { method fresh (line 167) | fn fresh(&mut self) -> TypeVar { method get_scheme (line 176) | fn get_scheme(&self, index: usize) -> Option<&Scheme> { method generalize (line 185) | fn generalize(&mut self, ty: Type) -> Scheme { method instantiate (line 195) | fn instantiate(&mut self, scheme: Scheme) -> Type { method elaborate (line 208) | pub fn elaborate(&mut self, term: &Term) -> SystemF { FILE: 05_recon/src/mutation/write_once.rs type WriteOnce (line 5) | pub struct WriteOnce { type WriteOnceCell (line 11) | pub type WriteOnceCell = Rc>; method default (line 14) | fn default() -> Self { method eq (line 24) | fn eq(&self, other: &Self) -> bool { function fmt (line 30) | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { function with_rank (line 36) | pub fn with_rank(rank: usize) -> Self { function set (line 44) | pub fn set(&self, data: T) -> Result<(), T> { function get (line 56) | pub fn get(&self) -> Option<&T> { function set_rank (line 64) | pub fn set_rank(&self, rank: usize) { function get_rank (line 68) | pub fn get_rank(&self) -> usize { function smoke (line 77) | fn smoke() { function smoke_shared (line 86) | fn smoke_shared() { FILE: 05_recon/src/naive.rs function var_bind (line 3) | fn var_bind(var: TypeVar, ty: Type) -> Result, St... function unify (line 17) | pub fn unify(a: Type, b: Type) -> Result, String> { function solve (line 36) | pub fn solve>(iter: I) -> Result Token { type Lexer (line 42) | pub struct Lexer<'s> { function new (line 48) | pub fn new(input: Chars<'s>) -> Lexer<'s> { function peek (line 60) | fn peek(&mut self) -> Option { function consume (line 65) | fn consume(&mut self) -> Option { function consume_while (line 84) | fn consume_while bool>(&mut self, pred: F) -> (String, Sp... function consume_delimiter (line 101) | fn consume_delimiter(&mut self) { function number (line 106) | fn number(&mut self) -> Token { function keyword (line 116) | fn keyword(&mut self) -> Token { function eat (line 136) | fn eat(&mut self, ch: char, kind: TokenKind) -> Token { function lex (line 146) | pub fn lex(&mut self) -> Token { type Item (line 167) | type Item = Token; method next (line 168) | fn next(&mut self) -> Option { type DeBruijnIndexer (line 179) | pub struct DeBruijnIndexer { method push (line 184) | pub fn push(&mut self, hint: String) -> usize { method pop (line 194) | pub fn pop(&mut self) { method lookup (line 198) | pub fn lookup(&self, key: &str) -> Option { type Parser (line 208) | pub struct Parser<'s> { function new (line 218) | pub fn new(input: &'s str) -> Parser<'s> { function consume (line 226) | fn consume(&mut self) -> Option { function expect (line 232) | fn expect(&mut self, kind: TokenKind) -> Option { function expect_term (line 243) | fn expect_term(&mut self) -> Option> { function peek (line 254) | fn peek(&mut self) -> Option { function peek_span (line 258) | fn peek_span(&mut self) -> Span { function lambda (line 262) | fn lambda(&mut self) -> Option> { function let_expr (line 276) | fn let_expr(&mut self) -> Option> { function application (line 292) | fn application(&mut self) -> Option> { function ident (line 301) | fn ident(&mut self) -> Option { function if_expr (line 312) | fn if_expr(&mut self) -> Option> { function atom (line 324) | fn atom(&mut self) -> Option> { function term (line 365) | fn term(&mut self) -> Option> { function parse_term (line 372) | pub fn parse_term(&mut self) -> Option> { FILE: 05_recon/src/types.rs type TypeVar (line 4) | pub struct TypeVar(pub u32, pub u32); method fmt (line 143) | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { type Tycon (line 7) | pub struct Tycon { method fmt (line 123) | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { type Type (line 13) | pub enum Type { method arrow (line 59) | pub fn arrow(a: Type, b: Type) -> Type { method bool (line 63) | pub fn bool() -> Type { method occurs (line 67) | pub fn occurs(&self, exist: TypeVar) -> bool { method de_arrow (line 74) | pub fn de_arrow(&self) -> (&Type, &Type) { method fmt (line 149) | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { type Scheme (line 19) | pub enum Scheme { type Substitution (line 24) | pub trait Substitution { method ftv (line 25) | fn ftv(&self) -> HashSet; method apply (line 26) | fn apply(self, s: &HashMap) -> Self; method ftv (line 30) | fn ftv(&self) -> HashSet { method apply (line 50) | fn apply(self, map: &HashMap) -> Type { method ftv (line 96) | fn ftv(&self) -> HashSet { method apply (line 103) | fn apply(self, map: &HashMap) -> Scheme { function compose (line 82) | pub fn compose(s1: HashMap, s2: HashMap) -... constant T_ARROW (line 117) | pub const T_ARROW: Tycon = Tycon { id: 0, arity: 2 }; constant T_INT (line 118) | pub const T_INT: Tycon = Tycon { id: 1, arity: 0 }; constant T_UNIT (line 119) | pub const T_UNIT: Tycon = Tycon { id: 2, arity: 0 }; constant T_BOOL (line 120) | pub const T_BOOL: Tycon = Tycon { id: 3, arity: 0 }; function fresh_name (line 134) | fn fresh_name(x: u32) -> String { FILE: 06_system_f/src/diagnostics.rs type Level (line 3) | pub enum Level { type Annotation (line 9) | pub struct Annotation { method new (line 23) | pub fn new>(span: Span, message: S) -> Annotation { type Diagnostic (line 15) | pub struct Diagnostic { method error (line 32) | pub fn error>(span: Span, message: S) -> Diagnostic { method warn (line 41) | pub fn warn>(span: Span, message: S) -> Diagnostic { method message (line 50) | pub fn message>(mut self, span: Span, message: S) -> D... method info (line 55) | pub fn info>(mut self, info: S) -> Diagnostic { method lines (line 60) | pub fn lines(&self) -> std::ops::Range { FILE: 06_system_f/src/eval.rs type Eval (line 7) | pub struct Eval<'ctx> { function with_context (line 12) | pub fn with_context(_context: &Context) -> Eval<'_> { function normal_form (line 16) | fn normal_form(&self, term: &Term) -> bool { function eval_primitive (line 31) | fn eval_primitive(&self, p: Primitive, term: Term) -> Option { function small_step (line 52) | pub fn small_step(&self, term: Term) -> Option { function case_subst (line 205) | fn case_subst(&self, pat: &Pattern, expr: &Term, term: &mut Term) { function term_subst (line 237) | fn term_subst(mut s: Term, t: &mut Term) { function type_subst (line 243) | fn type_subst(s: Type, t: &mut Term) { function literal (line 254) | fn literal() { function application (line 261) | fn application() { function type_application (line 275) | fn type_application() { function projection (line 290) | fn projection() { FILE: 06_system_f/src/main.rs function test_variant (line 20) | fn test_variant() -> Type { function code_format (line 37) | pub fn code_format(src: &str, diag: Diagnostic) { function eval (line 62) | fn eval(ctx: &mut types::Context, mut term: Term, verbose: bool) -> Resu... function parse_and_eval (line 91) | fn parse_and_eval(ctx: &mut types::Context, input: &str, verbose: bool) ... function nat_list (line 119) | fn nat_list() -> Type { function nat_list2 (line 126) | fn nat_list2() -> Type { function main (line 133) | fn main() { FILE: 06_system_f/src/patterns/mod.rs type Pattern (line 8) | pub enum Pattern { method matches (line 60) | pub fn matches(&self, term: &Term) -> bool { type PatVarStack (line 22) | pub struct PatVarStack { method collect (line 27) | pub fn collect(pat: &mut Pattern) -> Vec { method visit_variable (line 35) | fn visit_variable(&mut self, var: &String) { type PatternCount (line 42) | pub struct PatternCount(usize); method collect (line 45) | pub fn collect(pat: &mut Pattern) -> usize { method visit_variable (line 53) | fn visit_variable(&mut self, var: &String) { type PatTyStack (line 91) | pub struct PatTyStack<'ty> { function collect (line 97) | pub fn collect(ty: &'ty Type, pat: &Pattern) -> Vec<&'ty Type> { method visit_product (line 108) | fn visit_product(&mut self, pats: &Vec) { method visit_constructor (line 119) | fn visit_constructor(&mut self, label: &String, pat: &Pattern) { method visit_pattern (line 128) | fn visit_pattern(&mut self, pattern: &Pattern) { function pattern_count (line 142) | fn pattern_count() { function pattern_ty_stack (line 148) | fn pattern_ty_stack() { function pattern_var_stack (line 155) | fn pattern_var_stack() { FILE: 06_system_f/src/syntax/lexer.rs type Lexer (line 8) | pub struct Lexer<'s> { function new (line 14) | pub fn new(input: Chars<'s>) -> Lexer<'s> { function peek (line 26) | fn peek(&mut self) -> Option { function consume (line 31) | fn consume(&mut self) -> Option { function consume_while (line 50) | fn consume_while bool>(&mut self, pred: F) -> (String, Sp... function consume_delimiter (line 67) | fn consume_delimiter(&mut self) { function number (line 72) | fn number(&mut self) -> Token { function keyword (line 82) | fn keyword(&mut self) -> Token { function eat (line 127) | fn eat(&mut self, ch: char, kind: TokenKind) -> Token { function lex (line 137) | pub fn lex(&mut self) -> Token { type Item (line 174) | type Item = Token; method next (line 175) | fn next(&mut self) -> Option { function nested (line 190) | fn nested() { function case (line 201) | fn case() { FILE: 06_system_f/src/syntax/mod.rs type TokenKind (line 7) | pub enum TokenKind { type Token (line 58) | pub struct Token { method dummy (line 64) | pub const fn dummy() -> Token { method new (line 71) | pub const fn new(kind: TokenKind, span: Span) -> Token { FILE: 06_system_f/src/syntax/parser.rs type DeBruijnIndexer (line 13) | pub struct DeBruijnIndexer { method push (line 18) | pub fn push(&mut self, hint: String) -> usize { method pop (line 24) | pub fn pop(&mut self) { method lookup (line 28) | pub fn lookup(&self, key: &str) -> Option { method len (line 37) | pub fn len(&self) -> usize { type Parser (line 42) | pub struct Parser<'s> { type Error (line 52) | pub struct Error { type ErrorKind (line 59) | pub enum ErrorKind { function new (line 71) | pub fn new(input: &'s str) -> Parser<'s> { function diagnostic (line 84) | pub fn diagnostic(self) -> Diagnostic<'s> { function once_or_more (line 91) | fn once_or_more(&mut self, func: F, delimiter: TokenKind) -> Resul... function once (line 106) | fn once(&mut self, func: F, message: &str) -> Result function error (line 121) | fn error(&self, kind: ErrorKind) -> Result { function bump (line 129) | fn bump(&mut self) -> TokenKind { function bump_if (line 135) | fn bump_if(&mut self, kind: &TokenKind) -> bool { function expect (line 144) | fn expect(&mut self, kind: TokenKind) -> Result<(), Error> { function kind (line 157) | fn kind(&self) -> &TokenKind { function ty_variant (line 161) | fn ty_variant(&mut self) -> Result { function ty_app (line 171) | fn ty_app(&mut self) -> Result { function ty_atom (line 180) | fn ty_atom(&mut self) -> Result { function ty_tuple (line 230) | fn ty_tuple(&mut self) -> Result { function ty (line 245) | pub fn ty(&mut self) -> Result { function tyabs (line 270) | fn tyabs(&mut self) -> Result { function tmabs (line 278) | fn tmabs(&mut self) -> Result { function fold (line 291) | fn fold(&mut self) -> Result { function unfold (line 299) | fn unfold(&mut self) -> Result { function fix (line 307) | fn fix(&mut self) -> Result { function letexpr (line 314) | fn letexpr(&mut self) -> Result { function lambda (line 337) | fn lambda(&mut self) -> Result { function paren (line 350) | fn paren(&mut self) -> Result { function uppercase_id (line 363) | fn uppercase_id(&mut self) -> Result { function lowercase_id (line 374) | fn lowercase_id(&mut self) -> Result { function literal (line 385) | fn literal(&mut self) -> Result { function primitive (line 396) | fn primitive(&mut self) -> Result { function pat_atom (line 409) | fn pat_atom(&mut self) -> Result { function pattern (line 451) | fn pattern(&mut self) -> Result { function case_arm (line 469) | fn case_arm(&mut self) -> Result { function case (line 505) | fn case(&mut self) -> Result { function injection (line 517) | fn injection(&mut self) -> Result { function pack (line 533) | fn pack(&mut self) -> Result { function unpack (line 548) | fn unpack(&mut self) -> Result { function atom (line 569) | fn atom(&mut self) -> Result { function projection (line 602) | fn projection(&mut self) -> Result { function application (line 623) | fn application(&mut self) -> Result { function parse (line 650) | pub fn parse(&mut self) -> Result { FILE: 06_system_f/src/terms/mod.rs type Term (line 9) | pub struct Term { method new (line 86) | pub fn new(kind: Kind, span: Span) -> Term { method unit (line 91) | pub const fn unit() -> Term { method span (line 100) | pub fn span(&self) -> Span { method kind (line 105) | pub fn kind(&self) -> &Kind { method fmt (line 121) | fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { method fmt (line 159) | fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { type Primitive (line 16) | pub enum Primitive { type Kind (line 24) | pub enum Kind { type Arm (line 71) | pub struct Arm { type Literal (line 79) | pub enum Literal { method fmt (line 111) | fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { function pattern_matches (line 169) | fn pattern_matches() { FILE: 06_system_f/src/terms/visit.rs type Shift (line 7) | pub struct Shift { method new (line 13) | pub const fn new(shift: isize) -> Shift { method visit_var (line 19) | fn visit_var(&mut self, sp: &mut Span, var: &mut usize) { method visit_abs (line 25) | fn visit_abs(&mut self, sp: &mut Span, ty: &mut Type, term: &mut Term) { method visit_let (line 31) | fn visit_let(&mut self, sp: &mut Span, pat: &mut Pattern, t1: &mut Term,... method visit_case (line 39) | fn visit_case(&mut self, sp: &mut Span, term: &mut Term, arms: &mut Vec<... method visit_unpack (line 49) | fn visit_unpack(&mut self, _: &mut Span, package: &mut Term, term: &mut ... type Subst (line 57) | pub struct Subst { method new (line 63) | pub fn new(term: Term) -> Subst { method visit_abs (line 69) | fn visit_abs(&mut self, sp: &mut Span, ty: &mut Type, term: &mut Term) { method visit_let (line 75) | fn visit_let(&mut self, sp: &mut Span, pat: &mut Pattern, t1: &mut Term,... method visit_case (line 83) | fn visit_case(&mut self, sp: &mut Span, term: &mut Term, arms: &mut Vec<... method visit_unpack (line 93) | fn visit_unpack(&mut self, _: &mut Span, package: &mut Term, term: &mut ... method visit (line 100) | fn visit(&mut self, term: &mut Term) { type TyTermSubst (line 112) | pub struct TyTermSubst { method new (line 118) | pub fn new(ty: Type) -> TyTermSubst { method visit_ty (line 125) | fn visit_ty(&mut self, ty: &mut Type) { method visit_abs (line 135) | fn visit_abs(&mut self, sp: &mut Span, ty: &mut Type, term: &mut Term) { method visit_tyapp (line 142) | fn visit_tyapp(&mut self, sp: &mut Span, term: &mut Term, ty: &mut Type) { method visit_tyabs (line 147) | fn visit_tyabs(&mut self, sp: &mut Span, term: &mut Term) { method visit_fold (line 153) | fn visit_fold(&mut self, sp: &mut Span, ty: &mut Type, term: &mut Term) { method visit_unfold (line 158) | fn visit_unfold(&mut self, sp: &mut Span, ty: &mut Type, term: &mut Term) { method visit_unpack (line 163) | fn visit_unpack(&mut self, _: &mut Span, package: &mut Term, term: &mut ... method visit_pack (line 170) | fn visit_pack(&mut self, _: &mut Span, wit: &mut Type, body: &mut Term, ... method visit_injection (line 176) | fn visit_injection(&mut self, sp: &mut Span, label: &mut String, term: &... type InjRewriter (line 187) | pub struct InjRewriter; method visit (line 190) | fn visit(&mut self, term: &mut Term) { FILE: 06_system_f/src/types/mod.rs type Type (line 14) | pub enum Type { method fmt (line 406) | fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { type Variant (line 29) | pub struct Variant { type TypeError (line 35) | pub struct TypeError { type TypeErrorKind (line 41) | pub enum TypeErrorKind { type Context (line 58) | pub struct Context { method push (line 64) | fn push(&mut self, ty: Type) { method pop (line 68) | fn pop(&mut self) { method find (line 72) | fn find(&self, idx: usize) -> Option<&Type> { method alias (line 76) | pub fn alias(&mut self, alias: String, ty: Type) { method aliaser (line 80) | fn aliaser(&self) -> Aliaser<'_> { method de_alias (line 84) | pub fn de_alias(&mut self, term: &mut Term) { method type_check (line 108) | pub fn type_check(&mut self, term: &Term) -> Result { function variant_field (line 90) | pub fn variant_field<'vs>(var: &'vs [Variant], label: &str, span: Span) ... function subst (line 346) | pub fn subst(mut s: Type, mut t: Type) -> Type { type Aliaser (line 353) | struct Aliaser<'ctx> { method visit (line 358) | fn visit(&mut self, ty: &mut Type) { method visit_abs (line 379) | fn visit_abs(&mut self, sp: &mut Span, ty: &mut Type, term: &mut Term) { method visit_tyapp (line 384) | fn visit_tyapp(&mut self, sp: &mut Span, term: &mut Term, ty: &mut Type) { method visit_injection (line 389) | fn visit_injection(&mut self, sp: &mut Span, label: &mut String, term: &... method visit_fold (line 394) | fn visit_fold(&mut self, sp: &mut Span, ty: &mut Type, tm: &mut Term) { method visit_unfold (line 399) | fn visit_unfold(&mut self, sp: &mut Span, ty: &mut Type, tm: &mut Term) { FILE: 06_system_f/src/types/patterns.rs function overlap (line 24) | fn overlap(existing: &Pattern, new: &Pattern) -> bool { type Matrix (line 43) | pub struct Matrix<'pat> { function new (line 51) | pub fn new(expr_ty: Type) -> Matrix<'pat> { function exhaustive (line 77) | pub fn exhaustive(&self) -> bool { function can_add_row (line 123) | fn can_add_row(&self, new_row: Vec<&'pat Pattern>) -> bool { function try_add_row (line 133) | fn try_add_row(&mut self, new_row: Vec<&'pat Pattern>) -> bool { function add_pattern (line 148) | pub fn add_pattern(&mut self, pat: &'pat Pattern) -> bool { method type_check_case (line 192) | pub(crate) fn type_check_case(&mut self, expr: &Term, arms: &[Arm]) -> R... method pattern_type_eq (line 255) | pub(crate) fn pattern_type_eq(&self, pat: &Pattern, ty: &Type) -> bool { function product (line 296) | fn product() { function product_mistyped (line 305) | fn product_mistyped() { function constructor (line 313) | fn constructor() { function constructor_product (line 336) | fn constructor_product() { function matrix_tuple (line 363) | fn matrix_tuple() { function matrix_constructor (line 382) | fn matrix_constructor() { function matrix_bool (line 413) | fn matrix_bool() { FILE: 06_system_f/src/types/visit.rs type Shift (line 5) | pub struct Shift { method new (line 11) | pub const fn new(shift: isize) -> Shift { method visit_var (line 17) | fn visit_var(&mut self, var: &mut usize) { method visit_universal (line 23) | fn visit_universal(&mut self, inner: &mut Type) { method visit_existential (line 29) | fn visit_existential(&mut self, inner: &mut Type) { method visit_rec (line 35) | fn visit_rec(&mut self, ty: &mut Type) { type Subst (line 42) | pub struct Subst { method new (line 48) | pub fn new(ty: Type) -> Subst { method visit_universal (line 54) | fn visit_universal(&mut self, inner: &mut Type) { method visit_existential (line 60) | fn visit_existential(&mut self, inner: &mut Type) { method visit_rec (line 66) | fn visit_rec(&mut self, ty: &mut Type) { method visit (line 72) | fn visit(&mut self, ty: &mut Type) { FILE: 06_system_f/src/visit.rs type MutTypeVisitor (line 7) | pub trait MutTypeVisitor: Sized { method visit_var (line 8) | fn visit_var(&mut self, var: &mut usize) {} method visit_alias (line 9) | fn visit_alias(&mut self, alias: &mut String) {} method visit_arrow (line 11) | fn visit_arrow(&mut self, ty1: &mut Type, ty2: &mut Type) { method visit_universal (line 16) | fn visit_universal(&mut self, inner: &mut Type) { method visit_existential (line 20) | fn visit_existential(&mut self, inner: &mut Type) { method visit_variant (line 24) | fn visit_variant(&mut self, variant: &mut Vec) { method visit_product (line 30) | fn visit_product(&mut self, product: &mut Vec) { method visit_rec (line 36) | fn visit_rec(&mut self, ty: &mut Type) { method visit (line 40) | fn visit(&mut self, ty: &mut Type) { type MutTermVisitor (line 55) | pub trait MutTermVisitor: Sized { method visit_lit (line 56) | fn visit_lit(&mut self, sp: &mut Span, lit: &mut Literal) {} method visit_var (line 57) | fn visit_var(&mut self, sp: &mut Span, var: &mut usize) {} method visit_abs (line 59) | fn visit_abs(&mut self, sp: &mut Span, ty: &mut Type, term: &mut Term) { method visit_app (line 63) | fn visit_app(&mut self, sp: &mut Span, t1: &mut Term, t2: &mut Term) { method visit_let (line 68) | fn visit_let(&mut self, sp: &mut Span, pat: &mut Pattern, t1: &mut Ter... method visit_tyabs (line 73) | fn visit_tyabs(&mut self, sp: &mut Span, term: &mut Term) { method visit_tyapp (line 77) | fn visit_tyapp(&mut self, sp: &mut Span, term: &mut Term, ty: &mut Typ... method visit_primitive (line 81) | fn visit_primitive(&mut self, sp: &mut Span, prim: &mut Primitive) {} method visit_injection (line 82) | fn visit_injection(&mut self, sp: &mut Span, label: &mut String, term:... method visit_case (line 86) | fn visit_case(&mut self, sp: &mut Span, term: &mut Term, arms: &mut Ve... method visit_product (line 93) | fn visit_product(&mut self, sp: &mut Span, product: &mut Vec) { method visit_projection (line 99) | fn visit_projection(&mut self, sp: &mut Span, term: &mut Term, index: ... method visit_fold (line 103) | fn visit_fold(&mut self, sp: &mut Span, ty: &mut Type, term: &mut Term) { method visit_unfold (line 106) | fn visit_unfold(&mut self, sp: &mut Span, ty: &mut Type, term: &mut Te... method visit_pack (line 110) | fn visit_pack(&mut self, sp: &mut Span, witness: &mut Type, evidence: ... method visit_unpack (line 114) | fn visit_unpack(&mut self, sp: &mut Span, package: &mut Term, term: &m... method visit (line 119) | fn visit(&mut self, term: &mut Term) { method walk (line 123) | fn walk(&mut self, term: &mut Term) { type PatternVisitor (line 148) | pub trait PatternVisitor: Sized { method visit_literal (line 149) | fn visit_literal(&mut self, lit: &Literal) {} method visit_variable (line 150) | fn visit_variable(&mut self, var: &String) {} method visit_product (line 151) | fn visit_product(&mut self, pats: &Vec) { method visit_constructor (line 157) | fn visit_constructor(&mut self, label: &String, pat: &Pattern) { method visit_pattern (line 161) | fn visit_pattern(&mut self, pattern: &Pattern) { FILE: 07_system_fw/src/diagnostics.rs type Level (line 5) | pub enum Level { type Annotation (line 11) | pub struct Annotation { method new (line 25) | pub fn new>(span: Span, message: S) -> Annotation { type Diagnostic (line 17) | pub struct Diagnostic { method error (line 34) | pub fn error>(span: Span, message: S) -> Diagnostic { method warn (line 43) | pub fn warn>(span: Span, message: S) -> Diagnostic { method message (line 52) | pub fn message>(mut self, span: Span, message: S) -> D... method info (line 57) | pub fn info>(mut self, info: S) -> Diagnostic { method lines (line 62) | pub fn lines(&self) -> std::ops::Range { method fmt (line 81) | fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { FILE: 07_system_fw/src/elaborate.rs type ElaborationContext (line 13) | pub struct ElaborationContext<'s> { type Elaborated (line 24) | pub struct Elaborated { type Namespace (line 31) | pub struct Namespace { type ElabError (line 40) | pub enum ElabError { function new (line 49) | pub fn new() -> Self { function elaborate (line 56) | pub fn elaborate(program: &'s Program) -> Result { function with_tyvars (line 69) | fn with_tyvars) -> T>(&mut self, f:... function with_tmvars (line 80) | fn with_tmvars) -> T>(&mut self, f:... function elab_kind (line 88) | fn elab_kind(&self, k: &Kind) -> hir::Kind { function allocate_hir_id (line 95) | fn allocate_hir_id(&mut self) -> HirId { function define_value (line 101) | fn define_value(&mut self, name: String, expr: hir::Expr) -> HirId { function define_type (line 108) | fn define_type(&mut self, name: String, ty: hir::Type) -> HirId { function dump (line 115) | pub fn dump(&self) { function lexical_value (line 135) | fn lexical_value(&self, s: &str) -> Option { function debruijn_value (line 146) | fn debruijn_value(&self, s: &str) -> Option { function lookup_value (line 154) | fn lookup_value(&self, s: &str) -> Option { function lexical_type (line 161) | fn lexical_type(&self, s: &str) -> Option { function debruijn_type (line 171) | fn debruijn_type(&self, s: &str) -> Option { function enter_namespace (line 177) | fn enter_namespace(&mut self) -> usize { function leave_namespace (line 189) | fn leave_namespace(&mut self) { function with_new_namespace (line 198) | fn with_new_namespace) -> T>(&mut s... function elab_ty_row (line 208) | fn elab_ty_row(&mut self, row: &'s Row) -> Result { function elab_ty_inner (line 215) | fn elab_ty_inner(&mut self, tv: &'s str, ty: &'s Type) -> Result Result { function elab_let (line 274) | fn elab_let(&mut self, decls: &'s [Decl], expr: &'s Expr) -> Result Result { function elab_case (line 290) | fn elab_case(&mut self, expr: &'s Expr, arms: &'s [Arm]) -> Result Result Result Result { function naive_type_infer (line 381) | fn naive_type_infer(&self, pat: &hir::Pattern) -> Result Result Result Result>) -> Vec { function elab_decl_fun (line 717) | fn elab_decl_fun(&mut self, tyvars: &'s [Type], name: &'s str, arms: &'s... function elab_decl_expr (line 760) | fn elab_decl_expr(&mut self, expr: &'s Expr) -> Result { function elab_decl_and (line 765) | fn elab_decl_and(&mut self, a: &'s Decl, b: &'s Decl) -> Result Result { function elab_program (line 790) | pub fn elab_program(&mut self, prog: &'s Program) -> Result, ... type PatternMatrix (line 801) | pub struct PatternMatrix { method collapse (line 809) | fn collapse(self) -> Vec { type DeclNames (line 824) | struct DeclNames<'s> { function visit_pat (line 830) | fn visit_pat(&mut self, pat: &'s Pattern) { function visit_decl (line 849) | fn visit_decl(&mut self, d: &'s Decl) { type TyNameCollector (line 866) | pub struct TyNameCollector<'s> { function visit_variable (line 872) | fn visit_variable(&mut self, s: &'s str) { function visit_defined (line 876) | fn visit_defined(&mut self, s: &'s str) { FILE: 07_system_fw/src/functor.rs function parameterized_set (line 3) | pub fn parameterized_set() -> Type { function list_type (line 7) | fn list_type() -> Type { function parameterized_set_term (line 24) | pub fn parameterized_set_term() -> Term { function parameterized_functor (line 59) | fn parameterized_functor() { FILE: 07_system_fw/src/hir/bidir.rs type Context (line 8) | pub struct Context<'hir> { type Element (line 17) | pub enum Element { type Error (line 35) | pub enum Error { function find_annotation (line 43) | fn find_annotation(&self, idx: usize) -> Option<&Type> { function infer (line 60) | pub fn infer(&mut self, e: &'hir Expr) -> Result { function test (line 104) | pub fn test(prog: Elaborated) { FILE: 07_system_fw/src/hir/mod.rs type DeBruijn (line 6) | pub struct DeBruijn { type HirId (line 12) | pub struct HirId(pub(crate) u32); type Arm (line 16) | pub struct Arm { type Field (line 22) | pub struct Field { type Program (line 27) | pub struct Program { type Decl (line 33) | pub enum Decl { type Constructor (line 39) | pub struct Constructor { type Pattern (line 53) | pub enum Pattern { type Expr (line 73) | pub enum Expr { type Kind (line 101) | pub enum Kind { type Type (line 107) | pub enum Type { method fmt (line 151) | fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { type Variant (line 139) | pub struct Variant { type Row (line 145) | pub struct Row { FILE: 07_system_fw/src/main.rs function main (line 21) | fn main() { function unfold (line 48) | fn unfold(ty: Type) -> Type { FILE: 07_system_fw/src/stack.rs type Stack (line 5) | pub struct Stack { function push (line 11) | pub fn push(&mut self, val: T) { function pop (line 16) | pub fn pop(&mut self) -> Option { function popn (line 21) | pub fn popn(&mut self, n: usize) { function get (line 28) | pub fn get(&self, index: usize) -> Option<&T> { function with_capacity (line 33) | pub fn with_capacity(size: usize) -> Self { function new (line 40) | pub fn new() -> Self { function len (line 45) | pub fn len(&self) -> usize { function iter (line 49) | pub fn iter(&self) -> std::slice::Iter { function iter_mut (line 53) | pub fn iter_mut(&mut self) -> std::slice::IterMut { function lookup (line 59) | pub fn lookup(&self, key: &T) -> Option { function extend (line 70) | fn extend>(&mut self, iter: I) { method clone (line 78) | fn clone(&self) -> Self { method default (line 86) | fn default() -> Self { function fmt (line 92) | fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { function order (line 101) | fn order() { FILE: 07_system_fw/src/syntax/ast.rs type AstId (line 4) | pub struct AstId(pub(crate) u32); constant AST_DUMMY (line 5) | pub const AST_DUMMY: AstId = AstId(std::u32::MAX); type Program (line 43) | pub struct Program { type Arm (line 49) | pub struct Arm { type Field (line 56) | pub struct Field { type PatKind (line 64) | pub enum PatKind { type ExprKind (line 84) | pub enum ExprKind { type FnArm (line 106) | pub struct FnArm { type DeclKind (line 113) | pub enum DeclKind { type Kind (line 123) | pub enum Kind { type TypeKind (line 129) | pub enum TypeKind { method variants (line 173) | pub fn variants(&self) -> &[Variant] { method as_tyvar (line 180) | pub fn as_tyvar(&self) -> &str { method as_tyvar_d (line 187) | pub fn as_tyvar_d(self) -> String { type Variant (line 159) | pub struct Variant { method fmt (line 196) | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { type Row (line 166) | pub struct Row { method fmt (line 202) | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { FILE: 07_system_fw/src/syntax/lexer.rs type Lexer (line 8) | pub struct Lexer<'s> { function new (line 14) | pub fn new(input: Chars<'s>) -> Lexer<'s> { function peek (line 26) | fn peek(&mut self) -> Option { function consume (line 31) | fn consume(&mut self) -> Option { function consume_while (line 50) | fn consume_while bool>(&mut self, pred: F) -> (String, Sp... function consume_delimiter (line 67) | fn consume_delimiter(&mut self) { function id (line 71) | fn id(&mut self) -> (String, Span) { function valid_id_char (line 86) | fn valid_id_char(c: char) -> bool { function keyword (line 96) | fn keyword(&mut self) -> Spanned { function eat (line 130) | fn eat(&mut self, ch: char, kind: Token) -> Spanned { function number (line 140) | fn number(&mut self) -> Spanned { function lex (line 149) | pub fn lex(&mut self) -> Spanned { type Item (line 208) | type Item = Spanned; method next (line 209) | fn next(&mut self) -> Option { FILE: 07_system_fw/src/syntax/parser/decls.rs function decl_datatype (line 4) | fn decl_datatype(&mut self) -> Result { function decl_type (line 20) | fn decl_type(&mut self) -> Result { function decl_value (line 36) | fn decl_value(&mut self) -> Result { function decl_fun_arm (line 51) | fn decl_fun_arm(&mut self, ident: &str) -> Result { function decl_fun (line 64) | fn decl_fun(&mut self) -> Result { function decl_expr (line 84) | fn decl_expr(&mut self) -> Result { function parse_decl_atom (line 96) | pub fn parse_decl_atom(&mut self) -> Result { function parse_decl (line 106) | pub(crate) fn parse_decl(&mut self) -> Result { function parse_program (line 119) | pub fn parse_program(&mut self) -> Result { FILE: 07_system_fw/src/syntax/parser/exprs.rs function record_row (line 4) | fn record_row(&mut self) -> Result { function record_expr (line 13) | fn record_expr(&mut self) -> Result { function let_binding (line 22) | fn let_binding(&mut self) -> Result { function case_arm (line 36) | fn case_arm(&mut self) -> Result { function case_expr (line 46) | fn case_expr(&mut self) -> Result { function lambda_expr (line 58) | fn lambda_expr(&mut self) -> Result { function if_expr (line 68) | fn if_expr(&mut self) -> Result { function atomic_expr (line 90) | fn atomic_expr(&mut self) -> Result { function projection_expr (line 120) | fn projection_expr(&mut self) -> Result { function application_expr (line 133) | fn application_expr(&mut self) -> Result { function parse_expr (line 180) | pub fn parse_expr(&mut self) -> Result { FILE: 07_system_fw/src/syntax/parser/infix.rs type Infix (line 4) | pub struct Infix { method insert (line 9) | pub fn insert(&mut self, s: String, prec: usize) { method get (line 13) | pub fn get(&self, s: &str) -> Option { FILE: 07_system_fw/src/syntax/parser/mod.rs type Parser (line 13) | pub struct Parser<'s> { type ErrorKind (line 22) | pub enum ErrorKind { type InfixState (line 39) | pub struct InfixState(Infix); type Error (line 42) | pub struct Error { function new (line 49) | pub fn new(input: &'s str) -> Parser<'s> { function with_infix_state (line 53) | pub fn with_infix_state(input: &'s str, state: InfixState) -> Parser<'s> { function top_level (line 65) | pub fn top_level(&mut self) -> Result, Error> { function state (line 74) | pub fn state(&self) -> InfixState { function allocate_ast_id (line 78) | fn allocate_ast_id(&mut self) -> AstId { function error (line 85) | fn error(&self, k: ErrorKind) -> Result { function current (line 93) | fn current(&self) -> &Token { function bump (line 99) | fn bump(&mut self) -> Token { function bump_if (line 121) | fn bump_if(&mut self, kind: &Token) -> bool { function expect (line 130) | fn expect(&mut self, kind: Token) -> Result<(), Error> { function expect_lower_id (line 139) | fn expect_lower_id(&mut self) -> Result { function expect_upper_id (line 146) | fn expect_upper_id(&mut self) -> Result { function once (line 158) | fn once(&mut self, func: F, message: &str) -> Result function plus (line 177) | fn plus(&mut self, func: F, delimit: Option<&Token>) -> Result<... function star (line 202) | fn star(&mut self, func: F, delimit: Option<&Token>) -> Vec function delimited (line 219) | fn delimited(&mut self, func: F, delimit: Token) -> Result Result { function record_pattern (line 19) | fn record_pattern(&mut self) -> Result { function atomic_pattern (line 34) | pub(crate) fn atomic_pattern(&mut self) -> Result { function application_pattern (line 59) | fn application_pattern(&mut self) -> Result { function parse_pattern (line 79) | pub fn parse_pattern(&mut self) -> Result { FILE: 07_system_fw/src/syntax/parser/types.rs function variant (line 7) | pub fn variant(&mut self) -> Result { function type_sum (line 19) | pub fn type_sum(&mut self) -> Result { function parse_tyvar (line 27) | fn parse_tyvar(&mut self) -> Result { function parse_tyvar_sequence (line 38) | pub(crate) fn parse_tyvar_sequence(&mut self) -> Result, Error> { function parse_type_sequence (line 50) | fn parse_type_sequence(&mut self) -> Result, Error> { function existential (line 58) | fn existential(&mut self) -> Result { function universal (line 77) | fn universal(&mut self) -> Result { function row (line 94) | fn row(&mut self) -> Result { function record (line 105) | fn record(&mut self) -> Result { function type_atom (line 124) | pub(crate) fn type_atom(&mut self) -> Result { function abstraction_arg (line 173) | fn abstraction_arg(&mut self) -> Result<(Type, Kind), Error> { function abstraction (line 184) | fn abstraction(&mut self) -> Result { function application (line 203) | fn application(&mut self) -> Result { function product (line 215) | fn product(&mut self) -> Result { function parse_type (line 226) | pub fn parse_type(&mut self) -> Result { function kind_single (line 238) | fn kind_single(&mut self) -> Result { function kind (line 249) | pub fn kind(&mut self) -> Result { FILE: 07_system_fw/src/syntax/tokens.rs type Token (line 3) | pub enum Token { method extract_string (line 59) | pub fn extract_string(self) -> String { FILE: 07_system_fw/src/syntax/visit/types.rs type TypeVisitor (line 4) | pub trait TypeVisitor<'t>: Sized { method visit_defined (line 5) | fn visit_defined(&mut self, _: &'t str) {} method visit_variable (line 7) | fn visit_variable(&mut self, _: &'t str) {} method visit_function (line 9) | fn visit_function(&mut self, ty1: &'t Type, ty2: &'t Type) { method visit_application (line 14) | fn visit_application(&mut self, ty1: &'t Type, ty2: &'t Type) { method visit_sum (line 19) | fn visit_sum(&mut self, var: &'t [Variant]) { method visit_product (line 27) | fn visit_product(&mut self, var: &'t [Type]) { method visit_record (line 33) | fn visit_record(&mut self, var: &'t [Row]) { method visit_existential (line 39) | fn visit_existential(&mut self, _: &'t str, _: &'t Kind, ty: &'t Type) { method visit_universal (line 43) | fn visit_universal(&mut self, _: &'t str, _: &'t Kind, ty: &'t Type) { method visit_abstraction (line 47) | fn visit_abstraction(&mut self, _: &'t str, _: &'t Kind, ty: &'t Type) { method visit_recursive (line 51) | fn visit_recursive(&mut self, ty: &'t Type) { method visit_ty (line 55) | fn visit_ty(&mut self, ty: &'t Type) { method walk_ty (line 59) | fn walk_ty(&mut self, ty: &'t Type) { FILE: 07_system_fw/src/terms.rs type Constant (line 6) | pub enum Constant { type Kind (line 13) | pub enum Kind { type Field (line 59) | pub struct Field { type Record (line 66) | pub struct Record { method get (line 83) | pub fn get(&self, label: &str) -> Option<&Field> { type Term (line 71) | pub struct Term { method new (line 77) | pub fn new(kind: Kind, span: Span) -> Term { method fmt (line 96) | fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { FILE: 07_system_fw/src/typecheck.rs type Context (line 8) | pub struct Context { method kinding (line 124) | pub fn kinding(&mut self, ty: &Type) -> Result { method simplify_ty (line 219) | pub fn simplify_ty(&mut self, ty: &mut Type) -> Result { method equiv (line 236) | pub fn equiv(&mut self, lhs: &Type, rhs: &Type) -> Result Result<(), Di... method typecheck (line 263) | pub fn typecheck(&mut self, term: &Term) -> Result { method default (line 14) | fn default() -> Context { type KindError (line 23) | pub enum KindError { method to_diag (line 99) | fn to_diag(self, span: Span) -> Diagnostic { type TypeSimplifier (line 30) | struct TypeSimplifier<'a> { method visit_universal (line 38) | fn visit_universal(&mut self, kind: &mut TyKind, ty: &mut Type) { method visit_existential (line 44) | fn visit_existential(&mut self, kind: &mut TyKind, ty: &mut Type) { method visit_abs (line 50) | fn visit_abs(&mut self, kind: &mut TyKind, ty: &mut Type) { method visit (line 56) | fn visit(&mut self, ty: &mut Type) { function ty_app (line 568) | fn ty_app() { function ty_exist (line 597) | fn ty_exist() { function ty_abs (line 628) | fn ty_abs() { function ty_equivalence (line 639) | fn ty_equivalence() { function ty_record (line 647) | fn ty_record() { FILE: 07_system_fw/src/types.rs type Type (line 5) | pub enum Type { method subst (line 36) | pub fn subst(&mut self, mut s: Type) { method label (line 43) | pub fn label(&self, label: &str) -> Option<&Type> { method fmt (line 59) | fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { type TyField (line 23) | pub struct TyField { type TyKind (line 29) | pub enum TyKind { method fmt (line 100) | fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { type MutTypeVisitor (line 120) | pub trait MutTypeVisitor: Sized { method visit_var (line 121) | fn visit_var(&mut self, _: &mut usize) {} method visit_arrow (line 123) | fn visit_arrow(&mut self, ty1: &mut Type, ty2: &mut Type) { method visit_universal (line 128) | fn visit_universal(&mut self, _: &mut TyKind, ty: &mut Type) { method visit_existential (line 132) | fn visit_existential(&mut self, _: &mut TyKind, ty: &mut Type) { method visit_abs (line 136) | fn visit_abs(&mut self, _: &mut TyKind, ty: &mut Type) { method visit_app (line 140) | fn visit_app(&mut self, s: &mut Type, t: &mut Type) { method visit_record (line 145) | fn visit_record(&mut self, fields: &mut [TyField]) { method visit_product (line 151) | fn visit_product(&mut self, tys: &mut [Type]) { method visit_projection (line 157) | fn visit_projection(&mut self, ty: &mut Type, _: usize) { method visit_recursive (line 161) | fn visit_recursive(&mut self, ty: &mut Type) { method visit (line 165) | fn visit(&mut self, ty: &mut Type) { method walk (line 169) | fn walk(&mut self, ty: &mut Type) { method visit_var (line 199) | fn visit_var(&mut self, var: &mut usize) { method visit_universal (line 206) | fn visit_universal(&mut self, _: &mut TyKind, ty: &mut Type) { method visit_existential (line 212) | fn visit_existential(&mut self, _: &mut TyKind, ty: &mut Type) { method visit_abs (line 218) | fn visit_abs(&mut self, _: &mut TyKind, ty: &mut Type) { method visit_universal (line 243) | fn visit_universal(&mut self, _: &mut TyKind, ty: &mut Type) { method visit_existential (line 249) | fn visit_existential(&mut self, _: &mut TyKind, ty: &mut Type) { method visit_abs (line 255) | fn visit_abs(&mut self, _: &mut TyKind, ty: &mut Type) { method visit (line 267) | fn visit(&mut self, ty: &mut Type) { type Shift (line 187) | pub struct Shift { method new (line 193) | pub const fn new(shift: isize) -> Shift { type Subst (line 231) | pub struct Subst { method new (line 237) | pub fn new(ty: Type) -> Subst { FILE: util/src/arena.rs constant MIN_CAPACITY (line 40) | pub const MIN_CAPACITY: u32 = 16; type Arena (line 43) | pub struct Arena { type Index (line 49) | pub struct Index(NonZeroU32); type Entry (line 53) | enum Entry { function fmt (line 60) | fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { function default (line 69) | fn default() -> Arena { function with_capacity (line 89) | pub fn with_capacity(n: u32) -> Arena { function capacity (line 101) | pub fn capacity(&self) -> u32 { function get_free (line 110) | fn get_free(&self) -> Option { function set_free (line 119) | fn set_free(&mut self, next: Option) { function reserve (line 128) | fn reserve(&mut self, n: u32) { function try_insert (line 155) | pub fn try_insert(&mut self, item: T) -> Result { function insert (line 176) | pub fn insert(&mut self, item: T) -> Index { function reserve_insert (line 185) | fn reserve_insert(&mut self, item: T) -> Index { function remove (line 193) | pub fn remove(&mut self, index: Index) -> Option { function get (line 212) | pub fn get(&self, index: Index) -> Option<&T> { function get_mut (line 221) | pub fn get_mut(&mut self, index: Index) -> Option<&mut T> { function iter (line 229) | pub fn iter(&self) -> Iter<'_, T> { type Iter (line 242) | pub struct Iter<'a, T> { type Item (line 248) | type Item = &'a T; method next (line 249) | fn next(&mut self) -> Option { type IntoIter (line 261) | pub struct IntoIter { type Item (line 267) | type Item = T; method next (line 268) | fn next(&mut self) -> Option { type Item (line 280) | type Item = T; type IntoIter (line 281) | type IntoIter = IntoIter; method into_iter (line 284) | fn into_iter(self) -> Self::IntoIter { type Item (line 293) | type Item = &'a T; type IntoIter (line 294) | type IntoIter = Iter<'a, T>; method into_iter (line 296) | fn into_iter(self) -> Self::IntoIter { function from_iter (line 310) | fn from_iter>(iter: I) -> Arena { function index_size (line 324) | fn index_size() { function smoke_insert (line 329) | fn smoke_insert() { function smoke_remove (line 335) | fn smoke_remove() { function smoke_iter (line 343) | fn smoke_iter() { function fill (line 352) | fn fill() { FILE: util/src/diagnostic.rs type Diagnostic (line 7) | pub struct Diagnostic<'s> { function new (line 13) | pub fn new(src: &str) -> Diagnostic<'_> { function push (line 20) | pub fn push>(&mut self, msg: S, span: Span) { function error_count (line 24) | pub fn error_count(&self) -> usize { function pop (line 29) | pub fn pop(&mut self) -> Option { function emit (line 47) | pub fn emit(mut self) -> String { method drop (line 73) | fn drop(&mut self) { FILE: util/src/span.rs type Location (line 7) | pub struct Location { method new (line 14) | pub fn new(line: u32, col: u32, abs: u32) -> Location { method fmt (line 20) | fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { type Span (line 27) | pub struct Span { method new (line 39) | pub fn new(start: Location, end: Location) -> Span { method dummy (line 43) | pub const fn dummy() -> Span { method zero (line 52) | pub const fn zero() -> Span { type Output (line 147) | type Output = Self; method add (line 148) | fn add(self, rhs: Self) -> Self::Output { method add_assign (line 157) | fn add_assign(&mut self, rhs: Self) { type Spanned (line 33) | pub struct Spanned { function new (line 64) | pub fn new(span: Span, data: T) -> Spanned { function map (line 69) | pub fn map B>(self, f: F) -> Spanned { function replace (line 77) | pub fn replace(self, src: V) -> Spanned { function into_inner (line 85) | pub fn into_inner(self) -> T { function span (line 90) | pub fn span(&self) -> Span { function data (line 95) | pub fn data(self) -> T { function map_result (line 103) | pub fn map_result(self) -> Result, Spanned> { function map_option (line 110) | pub fn map_option(self) -> Option> { function fmt (line 117) | fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { function fmt (line 123) | fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { type Target (line 129) | type Target = T; function deref (line 130) | fn deref(&self) -> &Self::Target { method clone (line 136) | fn clone(&self) -> Self { FILE: util/src/unsafe_arena.rs type Arena (line 13) | pub struct Arena { type Chunk (line 20) | struct Chunk { type Info (line 29) | struct Info { method default (line 35) | fn default() -> Arena { function with_capacity (line 46) | pub fn with_capacity(capacity: usize) -> Arena { function can_alloc (line 59) | fn can_alloc(&self, n: usize) -> bool { function ensure_capacity (line 66) | fn ensure_capacity(&self, n: usize) { function entries (line 73) | fn entries(&self) -> usize { function chunks (line 81) | fn chunks(&self) -> Vec { function grow (line 106) | fn grow(&self, n: usize) { function alloc (line 133) | pub fn alloc(&self, value: T) -> &mut T { function alloc_raw_slice (line 147) | unsafe fn alloc_raw_slice(&self, n: usize) -> *mut T { function alloc_slice (line 157) | pub fn alloc_slice(&self, slice: &[T]) -> &mut [T] function drop (line 171) | fn drop(&mut self) { function padding_needed (line 179) | fn padding_needed(l: &Layout, align: usize) -> usize { function round (line 186) | fn round(layout: &Layout, align: usize) -> usize { function extend (line 193) | fn extend(a: Layout, b: Layout) -> Layout { function layout (line 204) | fn layout(capacity: usize) -> Layout { function new (line 213) | unsafe fn new(prev: *mut Chunk, capacity: usize) -> *mut Chunk { function destroy (line 227) | unsafe fn destroy(&mut self, len: usize) { function start (line 245) | pub fn start(&self) -> *mut T { function end (line 259) | pub fn end(&self) -> *mut T { type DropGuard (line 268) | struct DropGuard { method drop (line 273) | fn drop(&mut self) { type Test (line 279) | struct Test { function new_chunk (line 288) | fn new_chunk() { function drop_test (line 301) | fn drop_test() { function references (line 317) | fn references() { function slice (line 334) | fn slice() { FILE: x1_bidir/src/helpers.rs function ty_display (line 106) | fn ty_display(ty: &Type) -> String { function expr_display (line 128) | fn expr_display(ex: &Expr) -> String { method fmt (line 171) | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { method fmt (line 176) | fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { FILE: x1_bidir/src/main.rs type Kind (line 12) | enum Kind { type Type (line 19) | enum Type { method monotype (line 41) | fn monotype(&self) -> bool { method freevars (line 50) | fn freevars(&self) -> Vec { method shift (line 81) | fn shift(&mut self, s: isize) { method subst (line 111) | fn subst(&mut self, s: &mut Type) { type LR (line 148) | enum LR { type Expr (line 155) | enum Expr { type Arm (line 181) | struct Arm { type Element (line 188) | enum Element { type Context (line 207) | pub struct Context { method fresh_ev (line 216) | fn fresh_ev(&mut self) -> usize { method well_formed (line 225) | fn well_formed(&mut self, ty: &Type) -> bool { method check_wf (line 239) | fn check_wf(&mut self, ty: &Type) -> Result { method with_scope (line 248) | fn with_scope T>(&mut self, e: Element, m... method apply (line 262) | fn apply(&self, ty: Type) -> Type { method find_annotation (line 285) | fn find_annotation(&self, idx: usize) -> Option<&Type> { method find_type_var (line 305) | fn find_type_var(&self, idx: usize) -> Option<&Kind> { method find_solved (line 323) | fn find_solved(&self, alpha: usize) -> Option<&Type> { method splice_hole (line 337) | fn splice_hole)>(&mut self, exist: usize, f: F... method split_context (line 344) | fn split_context(&mut self, exist: usize) -> Result<(&mut Self, Vec Option { method beta_reduce (line 362) | fn beta_reduce(&mut self, ty: &mut Type) -> Result<(), String> { method subtype (line 403) | fn subtype(&mut self, mut a: Type, mut b: Type) -> Result<(), String> { method instantiateL (line 454) | fn instantiateL(&mut self, alpha: usize, a: &Type) -> Result<(), Strin... method instantiateR (line 516) | fn instantiateR(&mut self, a: &Type, alpha: usize) -> Result<(), Strin... method infer (line 568) | fn infer(&mut self, e: &Expr) -> Result { method infer_app (line 692) | fn infer_app(&mut self, ty: &Type, e2: &Expr) -> Result { method check (line 728) | fn check(&mut self, e: &Expr, a: &Type) -> Result<(), String> { function infer (line 784) | fn infer(ex: &Expr) -> Result { function main (line 792) | fn main() { function identity (line 830) | fn identity() { function application (line 841) | fn application() { function application2 (line 853) | fn application2() { function sum_type (line 872) | fn sum_type() { function product_type (line 897) | fn product_type() { FILE: x2_dependent/src/main.rs type Term (line 2) | enum Term { method normal (line 13) | fn normal(&self) -> bool { method whnf (line 21) | fn whnf(&self) -> bool { method subst (line 29) | fn subst(&mut self, mut t2: Term) { type Context (line 63) | struct Context { method get (line 105) | fn get(&self, idx: usize) -> Option<&Term> { method with_bind (line 109) | fn with_bind T>(&mut self, bind: Term, f: F)... method equiv (line 116) | fn equiv(&mut self, t1: &Term, t2: &Term) -> bool { method type_of (line 131) | fn type_of(&mut self, term: &Term) -> Result { type Error (line 68) | enum Error { type Visitor (line 74) | struct Visitor { method new (line 79) | fn new() -> Visitor { method visit (line 83) | fn visit(&mut self, term: &mut Term, f: &F) { function beta_reduce (line 168) | fn beta_reduce(mut term: Term) -> Term { function main (line 192) | fn main() {