Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/HigherOrderCO/Bend
/ functions
Functions
608 in github.com/HigherOrderCO/Bend
⨍
Functions
608
◇
Types & classes
103
↓ 434 callers
Method
clone
(&self)
src/fun/mod.rs:391
↓ 206 callers
Method
iter
Returns an iterator over each subpattern in depth-first, left to right order. TODO: Not lazy.
src/fun/mod.rs:1035
↓ 176 callers
Method
push
(&mut self, nam: Option<&Name>)
src/fun/transform/unique_names.rs:169
↓ 114 callers
Method
as_ref
(&self)
src/fun/mod.rs:1220
↓ 98 callers
Function
take
(t: Stmt)
src/imp/to_fun.rs:91
↓ 96 callers
Method
insert
(&mut self, name: Name, scheme: Scheme)
src/fun/check/type_check.rs:135
↓ 82 callers
Function
maybe_grow
(f: F)
src/lib.rs:472
↓ 78 callers
Method
skip_trivia_inline
Skips until the next non-trivia character in the same line.
src/fun/parser.rs:1461
↓ 70 callers
Method
get
(&self, r#ref: &Ref)
src/hvm/mutual_recursion.rs:152
↓ 48 callers
Method
try_consume_exactly
Consumes text if the input starts exactly with it. Otherwise, do nothing.
src/fun/parser.rs:1513
↓ 47 callers
Method
index
(&mut self)
src/fun/parser.rs:1203
↓ 42 callers
Method
pop
(&mut self, nam: Option<&Name>)
src/fun/transform/unique_names.rs:180
↓ 40 callers
Method
skip_trivia
(&mut self)
src/fun/parser.rs:1238
↓ 39 callers
Method
children_mut
(&mut self)
src/fun/mod.rs:614
↓ 39 callers
Method
try_consume
Consumes text if the input starts with it or trivia. Otherwise, do nothing.
src/fun/parser.rs:1502
↓ 36 callers
Method
consume
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 callers
Method
index
(&mut self)
src/imp/parser.rs:1338
↓ 36 callers
Method
list_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 callers
Method
subst
(&self, subst: &Subst)
src/fun/check/type_check.rs:58
↓ 35 callers
Method
parse_var_name
(&mut self)
src/fun/parser.rs:1352
↓ 34 callers
Method
try_parse_keyword
(&mut self, keyword: &str)
src/fun/parser.rs:1522
↓ 32 callers
Method
enter_port
Returns the value stored at a port, the port on the other side of the given one.
src/net/mod.rs:93
↓ 30 callers
Method
parse_expr
"λ" (<name> ","?)+ ":" <expr> | "open" <type> ":" <var> | <infix>
src/imp/parser.rs:431
↓ 28 callers
Method
compose
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 callers
Method
consume_exactly
Consumes exactly the text without skipping.
src/fun/parser.rs:1375
↓ 25 callers
Method
parse_keyword
(&mut self, keyword: &str)
src/fun/parser.rs:1531
↓ 25 callers
Method
to_fun
TODO: Change all functions to return diagnostics
src/imp/to_fun.rs:14
↓ 22 callers
Method
consume
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 callers
Method
expected_spanned
(&mut self, exp: &str, span: Range<usize>)
src/fun/parser.rs:1466
↓ 21 callers
Method
parse_statement
Parses a statement and returns the indentation of the next statement.
src/imp/parser.rs:540
↓ 20 callers
Method
fatal
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 callers
Method
link
(&mut self, a: Place<'t>, b: Place<'t>)
src/fun/term_to_net.rs:278
↓ 19 callers
Function
parse_book_single_file
(code: &str, origin: &Path)
tests/golden_tests.rs:44
↓ 19 callers
Function
run_golden_test_dir
(test_name: &str, run: &RunFn)
tests/golden_tests.rs:78
↓ 19 callers
Method
skip_trivia
(&mut self)
src/imp/parser.rs:1364
↓ 18 callers
Method
add_function_error
(&mut self, err: impl std::fmt::Display, name: Name, source: Source)
src/diagnostics.rs:84
↓ 17 callers
Method
add_book_error
(&mut self, err: impl std::fmt::Display)
src/diagnostics.rs:80
↓ 17 callers
Method
consume_indent_exactly
(&mut self, expected: Indent)
src/imp/parser.rs:530
↓ 17 callers
Method
consume_new_line
(&mut self)
src/fun/parser.rs:1384
↓ 17 callers
Method
starts_with_keyword
(&mut self, keyword: &str)
src/fun/parser.rs:1544
↓ 16 callers
Method
binds
(&self)
src/fun/transform/lift_local_defs.rs:24
↓ 16 callers
Method
children
Iterators */
src/fun/mod.rs:578
↓ 16 callers
Method
read_term
(&mut self, next: Port)
src/fun/net_to_term.rs:80
↓ 15 callers
Method
node_id
Returns the node address of a port.
src/net/mod.rs:143
↓ 14 callers
Method
enter_level
(&mut self)
src/fun/parser.rs:1306
↓ 14 callers
Method
exit_level
(&mut self)
src/fun/parser.rs:1312
↓ 14 callers
Method
substitute_map_gets
(&mut self, id: &mut usize)
src/imp/gen_map_get.rs:152
↓ 14 callers
Function
unify_term
(t1: &Type, t2: &Type, ctx: &Term)
src/fun/check/type_check.rs:612
↓ 13 callers
Method
err_msg_spanned
If the parser result is an error, adds code location information to the error message.
src/fun/parser.rs:1485
↓ 12 callers
Method
advance_newlines
Skips trivia, returns the number of trivia characters skipped in the last line.
src/fun/parser.rs:1391
↓ 12 callers
Method
free_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 callers
Method
node
Returns a reference to a node.
src/net/mod.rs:88
↓ 12 callers
Method
with_ctx
If the parser result is an error, adds highlighted code context to the message.
src/fun/parser.rs:1493
↓ 11 callers
Function
compile_book
( book: &mut Book, opts: CompileOpts, diagnostics_cfg: DiagnosticsConfig, args: Option<Vec<Term>>, )
src/lib.rs:42
↓ 11 callers
Method
error
(&mut self, error: ReadbackError)
src/fun/net_to_term.rs:540
↓ 11 callers
Function
gen_get
(current: &mut Stmt, substitutions: Substitutions)
src/imp/gen_map_get.rs:215
↓ 11 callers
Method
labelled
(&mut self, parser: impl Fn(&mut Self) -> ParseResult<T>, label: &str)
src/fun/parser.rs:1322
↓ 10 callers
Method
fresh
(&mut self)
src/fun/check/type_check.rs:163
↓ 10 callers
Method
make_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 callers
Method
parse_restricted_name
(&mut self, kind: &str)
src/fun/parser.rs:1329
↓ 10 callers
Function
wrap
(nxt: Option<fun::Pattern>, term: fun::Term, ask: bool)
src/imp/to_fun.rs:98
↓ 9 callers
Method
expected
Generates an error message for parsing failures, including the highlighted context. Override to have our own error message.
src/fun/parser.rs:1210
↓ 9 callers
Method
parse_top_level_name
(&mut self)
src/fun/parser.rs:1348
↓ 9 callers
Function
run_book
( mut book: Book, run_opts: RunOpts, compile_opts: CompileOpts, diagnostics_cfg: DiagnosticsConfig,
src/lib.rs:179
↓ 9 callers
Function
tree_children
(tree: &Tree)
src/hvm/mod.rs:11
↓ 8 callers
Function
process_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 callers
Method
rule
(&self)
src/fun/mod.rs:1110
↓ 8 callers
Method
rule_mut
(&mut self)
src/fun/mod.rs:1116
↓ 8 callers
Method
slot
Returns the slot of a port.
src/net/mod.rs:148
↓ 8 callers
Method
to_tag
(&self, label: Option<u16>)
src/fun/term_to_net.rs:433
↓ 8 callers
Method
unique_top_level_names
(&self, src: &Name)
src/imports/packages.rs:251
↓ 7 callers
Method
add_diagnostic
( &mut self, msg: impl std::fmt::Display, severity: Severity, orig: DiagnosticOrigin, sour
src/diagnostics.rs:118
↓ 7 callers
Method
check_unbound_vars
Checks that there are no unbound variables in all definitions.
src/fun/check/unbound_vars.rs:16
↓ 7 callers
Method
expected
Generates an error message for parsing failures, including the highlighted context. Override to have our own error message.
src/imp/parser.rs:1345
↓ 7 callers
Method
generalize
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 callers
Method
new_opr
(&mut self)
src/fun/term_to_net.rs:321
↓ 7 callers
Method
parse_type_term
(&mut self)
src/fun/parser.rs:1052
↓ 6 callers
Method
add_binds
( &mut self, bnd: impl IntoIterator<Item = (&'a Option<Name>, Scheme)>, )
src/fun/check/type_check.rs:139
↓ 6 callers
Method
add_function_warning
( &mut self, warn: impl std::fmt::Display, warn_type: WarningType, def_name: Name, source:
src/diagnostics.rs:97
↓ 6 callers
Method
desugar_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 callers
Method
encode_builtins
(&mut self)
src/fun/builtins.rs:57
↓ 6 callers
Method
expected_indent
(&mut self, expected: Indent, got: Indent)
src/imp/parser.rs:1305
↓ 6 callers
Method
insert_used
(&self, def_name: &Name, used: Used, uses: &mut Definitions)
src/fun/transform/definition_pruning.rs:161
↓ 6 callers
Method
is_builtin
(&self)
src/fun/mod.rs:1095
↓ 6 callers
Method
parse_term
(&mut self)
src/fun/parser.rs:576
↓ 6 callers
Method
pop_binds
(&mut self, old_bnd: Vec<(Name, Option<Scheme>)>)
src/fun/check/type_check.rs:153
↓ 6 callers
Method
set_all
(self)
src/lib.rs:386
↓ 6 callers
Function
simplify_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 callers
Method
to_bits
(&self)
src/fun/mod.rs:962
↓ 6 callers
Function
wrap_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 callers
Method
binds
(&self)
src/fun/mod.rs:995
↓ 5 callers
Method
binds_mut
(&mut self)
src/fun/mod.rs:1002
↓ 5 callers
Function
compile_opts_from_cli
(args: &Vec<OptArgs>, compiler_target: CompilerTarget)
src/main.rs:195
↓ 5 callers
Method
contains_source
(&self, s: &Name)
src/imports/mod.rs:95
↓ 5 callers
Method
input
(&mut self)
src/fun/parser.rs:1199
↓ 5 callers
Method
instantiate
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 callers
Method
parse_pattern
(&mut self, simple: bool)
src/fun/parser.rs:482
↓ 5 callers
Function
set_warning_cfg_from_cli
(mut cfg: DiagnosticsConfig, warn_opts: CliWarnOpts)
src/main.rs:407
↓ 5 callers
Method
subst_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 callers
Method
take_rule_err
( &mut self, result: Result<T, E>, def_name: Name, )
src/diagnostics.rs:129
next →
1–100 of 608, ranked by callers