MCPcopy Index your code

hub / github.com/HigherOrderCO/Bend / functions

Functions608 in github.com/HigherOrderCO/Bend

↓ 434 callersMethodclone
(&self)
src/fun/mod.rs:391
↓ 206 callersMethoditer
Returns an iterator over each subpattern in depth-first, left to right order. TODO: Not lazy.
src/fun/mod.rs:1035
↓ 176 callersMethodpush
(&mut self, nam: Option<&Name>)
src/fun/transform/unique_names.rs:169
↓ 114 callersMethodas_ref
(&self)
src/fun/mod.rs:1220
↓ 98 callersFunctiontake
(t: Stmt)
src/imp/to_fun.rs:91
↓ 96 callersMethodinsert
(&mut self, name: Name, scheme: Scheme)
src/fun/check/type_check.rs:135
↓ 82 callersFunctionmaybe_grow
(f: F)
src/lib.rs:472
↓ 78 callersMethodskip_trivia_inline
Skips until the next non-trivia character in the same line.
src/fun/parser.rs:1461
↓ 70 callersMethodget
(&self, r#ref: &Ref)
src/hvm/mutual_recursion.rs:152
↓ 48 callersMethodtry_consume_exactly
Consumes text if the input starts exactly with it. Otherwise, do nothing.
src/fun/parser.rs:1513
↓ 47 callersMethodindex
(&mut self)
src/fun/parser.rs:1203
↓ 42 callersMethodpop
(&mut self, nam: Option<&Name>)
src/fun/transform/unique_names.rs:180
↓ 40 callersMethodskip_trivia
(&mut self)
src/fun/parser.rs:1238
↓ 39 callersMethodchildren_mut
(&mut self)
src/fun/mod.rs:614
↓ 39 callersMethodtry_consume
Consumes text if the input starts with it or trivia. Otherwise, do nothing.
src/fun/parser.rs:1502
↓ 36 callersMethodconsume
Consumes an instance of the given string, erroring if it is not found. Override to have our own error message.
src/fun/parser.rs:1228
↓ 36 callersMethodindex
(&mut self)
src/imp/parser.rs:1338
↓ 36 callersMethodlist_like
Parses a list-like structure like "[x1, x2, x3,]". Since a list is always well terminated, we consume newlines. `parser` is a function that parses an
src/fun/parser.rs:1563
↓ 36 callersMethodsubst
(&self, subst: &Subst)
src/fun/check/type_check.rs:58
↓ 35 callersMethodparse_var_name
(&mut self)
src/fun/parser.rs:1352
↓ 34 callersMethodtry_parse_keyword
(&mut self, keyword: &str)
src/fun/parser.rs:1522
↓ 32 callersMethodenter_port
Returns the value stored at a port, the port on the other side of the given one.
src/net/mod.rs:93
↓ 30 callersMethodparse_expr
"λ" (<name> ","?)+ ":" <expr> | "open" <type> ":" <var> | <infix>
src/imp/parser.rs:431
↓ 28 callersMethodcompose
Compose two substitutions. Applies the first substitution to the second, and then inserts the result into the first.
src/fun/check/type_check.rs:113
↓ 28 callersMethodconsume_exactly
Consumes exactly the text without skipping.
src/fun/parser.rs:1375
↓ 25 callersMethodparse_keyword
(&mut self, keyword: &str)
src/fun/parser.rs:1531
↓ 25 callersMethodto_fun
TODO: Change all functions to return diagnostics
src/imp/to_fun.rs:14
↓ 22 callersMethodconsume
Consumes an instance of the given string, erroring if it is not found. Override to have our own error message.
src/imp/parser.rs:1354
↓ 21 callersMethodexpected_spanned
(&mut self, exp: &str, span: Range<usize>)
src/fun/parser.rs:1466
↓ 21 callersMethodparse_statement
Parses a statement and returns the indentation of the next statement.
src/imp/parser.rs:540
↓ 20 callersMethodfatal
Checks if any error was emitted since the start of the pass, Returning all the current information as a `Err(Info)`, replacing `&mut self` with an emp
src/diagnostics.rs:168
↓ 19 callersMethodlink
(&mut self, a: Place<'t>, b: Place<'t>)
src/fun/term_to_net.rs:278
↓ 19 callersFunctionparse_book_single_file
(code: &str, origin: &Path)
tests/golden_tests.rs:44
↓ 19 callersFunctionrun_golden_test_dir
(test_name: &str, run: &RunFn)
tests/golden_tests.rs:78
↓ 19 callersMethodskip_trivia
(&mut self)
src/imp/parser.rs:1364
↓ 18 callersMethodadd_function_error
(&mut self, err: impl std::fmt::Display, name: Name, source: Source)
src/diagnostics.rs:84
↓ 17 callersMethodadd_book_error
(&mut self, err: impl std::fmt::Display)
src/diagnostics.rs:80
↓ 17 callersMethodconsume_indent_exactly
(&mut self, expected: Indent)
src/imp/parser.rs:530
↓ 17 callersMethodconsume_new_line
(&mut self)
src/fun/parser.rs:1384
↓ 17 callersMethodstarts_with_keyword
(&mut self, keyword: &str)
src/fun/parser.rs:1544
↓ 16 callersMethodbinds
(&self)
src/fun/transform/lift_local_defs.rs:24
↓ 16 callersMethodchildren
Iterators */
src/fun/mod.rs:578
↓ 16 callersMethodread_term
(&mut self, next: Port)
src/fun/net_to_term.rs:80
↓ 15 callersMethodnode_id
Returns the node address of a port.
src/net/mod.rs:143
↓ 14 callersMethodenter_level
(&mut self)
src/fun/parser.rs:1306
↓ 14 callersMethodexit_level
(&mut self)
src/fun/parser.rs:1312
↓ 14 callersMethodsubstitute_map_gets
(&mut self, id: &mut usize)
src/imp/gen_map_get.rs:152
↓ 14 callersFunctionunify_term
(t1: &Type, t2: &Type, ctx: &Term)
src/fun/check/type_check.rs:612
↓ 13 callersMethoderr_msg_spanned
If the parser result is an error, adds code location information to the error message.
src/fun/parser.rs:1485
↓ 12 callersMethodadvance_newlines
Skips trivia, returns the number of trivia characters skipped in the last line.
src/fun/parser.rs:1391
↓ 12 callersMethodfree_vars
Collects all the free variables that a term has and the number of times each var is used
src/fun/mod.rs:876
↓ 12 callersMethodnode
Returns a reference to a node.
src/net/mod.rs:88
↓ 12 callersMethodwith_ctx
If the parser result is an error, adds highlighted code context to the message.
src/fun/parser.rs:1493
↓ 11 callersFunctioncompile_book
( book: &mut Book, opts: CompileOpts, diagnostics_cfg: DiagnosticsConfig, args: Option<Vec<Term>>, )
src/lib.rs:42
↓ 11 callersMethoderror
(&mut self, error: ReadbackError)
src/fun/net_to_term.rs:540
↓ 11 callersFunctiongen_get
(current: &mut Stmt, substitutions: Substitutions)
src/imp/gen_map_get.rs:215
↓ 11 callersMethodlabelled
(&mut self, parser: impl Fn(&mut Self) -> ParseResult<T>, label: &str)
src/fun/parser.rs:1322
↓ 10 callersMethodfresh
(&mut self)
src/fun/check/type_check.rs:163
↓ 10 callersMethodmake_var_names_unique
Makes all variables in each definition have a new unique name. Skips unbound variables. Precondition: Definition references have been resolved.
src/fun/transform/unique_names.rs:13
↓ 10 callersMethodparse_restricted_name
(&mut self, kind: &str)
src/fun/parser.rs:1329
↓ 10 callersFunctionwrap
(nxt: Option<fun::Pattern>, term: fun::Term, ask: bool)
src/imp/to_fun.rs:98
↓ 9 callersMethodexpected
Generates an error message for parsing failures, including the highlighted context. Override to have our own error message.
src/fun/parser.rs:1210
↓ 9 callersMethodparse_top_level_name
(&mut self)
src/fun/parser.rs:1348
↓ 9 callersFunctionrun_book
( mut book: Book, run_opts: RunOpts, compile_opts: CompileOpts, diagnostics_cfg: DiagnosticsConfig,
src/lib.rs:179
↓ 9 callersFunctiontree_children
(tree: &Tree)
src/hvm/mod.rs:11
↓ 8 callersFunctionprocess_node_subtree
( subtree: &'a Tree, net_root: &str, subtrees: &mut Vec<(String, &'a Tree)>, n_vars: &mut Node
src/net/hvm_to_net.rs:44
↓ 8 callersMethodrule
(&self)
src/fun/mod.rs:1110
↓ 8 callersMethodrule_mut
(&mut self)
src/fun/mod.rs:1116
↓ 8 callersMethodslot
Returns the slot of a port.
src/net/mod.rs:148
↓ 8 callersMethodto_tag
(&self, label: Option<u16>)
src/fun/term_to_net.rs:433
↓ 8 callersMethodunique_top_level_names
(&self, src: &Name)
src/imports/packages.rs:251
↓ 7 callersMethodadd_diagnostic
( &mut self, msg: impl std::fmt::Display, severity: Severity, orig: DiagnosticOrigin, sour
src/diagnostics.rs:118
↓ 7 callersMethodcheck_unbound_vars
Checks that there are no unbound variables in all definitions.
src/fun/check/unbound_vars.rs:16
↓ 7 callersMethodexpected
Generates an error message for parsing failures, including the highlighted context. Override to have our own error message.
src/imp/parser.rs:1345
↓ 7 callersMethodgeneralize
Converts a monomorphic type into a type scheme by abstracting over the type variables free in `t`, but not free in the type environment.
src/fun/check/type_check.rs:76
↓ 7 callersMethodnew_opr
(&mut self)
src/fun/term_to_net.rs:321
↓ 7 callersMethodparse_type_term
(&mut self)
src/fun/parser.rs:1052
↓ 6 callersMethodadd_binds
( &mut self, bnd: impl IntoIterator<Item = (&'a Option<Name>, Scheme)>, )
src/fun/check/type_check.rs:139
↓ 6 callersMethodadd_function_warning
( &mut self, warn: impl std::fmt::Display, warn_type: WarningType, def_name: Name, source:
src/diagnostics.rs:97
↓ 6 callersMethoddesugar_use
Inline copies of the declared bind in the `use` expression. Example: ```bend use id = λx x (id id id) // Transforms to: (λx x λx x λx x) ```
src/fun/transform/desugar_use.rs:17
↓ 6 callersMethodencode_builtins
(&mut self)
src/fun/builtins.rs:57
↓ 6 callersMethodexpected_indent
(&mut self, expected: Indent, got: Indent)
src/imp/parser.rs:1305
↓ 6 callersMethodinsert_used
(&self, def_name: &Name, used: Used, uses: &mut Definitions)
src/fun/transform/definition_pruning.rs:161
↓ 6 callersMethodis_builtin
(&self)
src/fun/mod.rs:1095
↓ 6 callersMethodparse_term
(&mut self)
src/fun/parser.rs:576
↓ 6 callersMethodpop_binds
(&mut self, old_bnd: Vec<(Name, Option<Scheme>)>)
src/fun/check/type_check.rs:153
↓ 6 callersMethodset_all
(self)
src/lib.rs:386
↓ 6 callersFunctionsimplify_rule_match
Creates the match tree for a given pattern matching function definition. For each constructor, a match case is created. The match cases follow the sa
src/fun/transform/desugar_match_defs.rs:151
↓ 6 callersMethodto_bits
(&self)
src/fun/mod.rs:962
↓ 6 callersFunctionwrap_nxt_assign_stmt
If the statement was a return, returns it, erroring if there is another after it. Otherwise, turns it into a 'let' and returns the next statement.
src/imp/to_fun.rs:474
↓ 5 callersMethodbinds
(&self)
src/fun/mod.rs:995
↓ 5 callersMethodbinds_mut
(&mut self)
src/fun/mod.rs:1002
↓ 5 callersFunctioncompile_opts_from_cli
(args: &Vec<OptArgs>, compiler_target: CompilerTarget)
src/main.rs:195
↓ 5 callersMethodcontains_source
(&self, s: &Name)
src/imports/mod.rs:95
↓ 5 callersMethodinput
(&mut self)
src/fun/parser.rs:1199
↓ 5 callersMethodinstantiate
Converts a type scheme into a monomorphic type by assigning fresh type variables to each variable bound by the scheme.
src/fun/check/type_check.rs:102
↓ 5 callersMethodparse_pattern
(&mut self, simple: bool)
src/fun/parser.rs:482
↓ 5 callersFunctionset_warning_cfg_from_cli
(mut cfg: DiagnosticsConfig, warn_opts: CliWarnOpts)
src/main.rs:407
↓ 5 callersMethodsubst_ctr
Substitutes the occurrences of a type constructor with the given name. Substitutes both `Var` and `Ctr` types since `Var` could be referring to an unr
src/fun/mod.rs:1126
↓ 5 callersMethodtake_rule_err
( &mut self, result: Result<T, E>, def_name: Name, )
src/diagnostics.rs:129
next →1–100 of 608, ranked by callers