MCPcopy Create free account

hub / github.com/JRMurr/tix / functions

Functions2,574 in github.com/JRMurr/tix

↓ 14 callersMethodload_context_by_name
Load context stubs for a named built-in context (e.g. "nixos"). If `builtin_stubs_dir` is set, checks for `<dir>/<name>.tix` first. Falls back to the
crates/lang_check/src/aliases.rs:585
↓ 14 callersFunctionmk_int
Build primitive TyRef helpers to avoid repeated arena.intern() calls.
crates/lsp/src/ty_nav.rs:408
↓ 14 callersMethodopen
Open a file (reads content from the TempProject on disk).
crates/lsp/tests/common/mod.rs:198
↓ 14 callersFunctionsimplify
Simplify a type using co-occurrence analysis. Takes a mutable arena because simplification may intern new type nodes.
crates/lang_ty/src/simplify.rs:362
↓ 13 callersMethodalloc_concrete
Allocate a concrete type and return its TyId.
crates/lang_check/src/lib.rs:1060
↓ 13 callersMethodfind_concrete_through_inter
Like `find_concrete`, but if the result is an `Inter(α, C)` where exactly one member is a concrete non-Neg, non-variable type, return that member. Thi
crates/lang_check/src/type_table.rs:420
↓ 13 callersFunctionfind_name
Find a NameId by its text. Panics if not found.
crates/lang_ast/src/tests.rs:11
↓ 13 callersFunctionget_check_error
(src: &str)
crates/lang_check/src/tests.rs:187
↓ 13 callersMethodmark
Record a phase boundary. The phase name should be a short label describing what just completed (e.g. "parse+lower", "inference").
crates/cli/src/timing.rs:89
↓ 13 callersMethodnew_concrete
Store a concrete (non-variable) type and return its TyId.
crates/lang_check/src/storage.rs:110
↓ 13 callersFunctionoty_int
()
crates/cli/src/main.rs:1640
↓ 13 callersFunctiontemp_path
Generate a unique temporary file path for tests, avoiding collisions when tests run in parallel.
crates/lsp/src/test_util.rs:9
↓ 12 callersMethodcanonicalize_child
Canonicalize and return an arena-interned TyRef. When the same (TyId, Polarity) is used as a child from multiple parents, they share the same index —
crates/lang_check/src/collect.rs:206
↓ 12 callersFunctioncompute_cache_key
Compute a cache key from input store paths and the Nix-literal strings describing extra modules to splice into the NixOS/HM evals. The extra-module st
crates/lsp/src/store_stubs.rs:480
↓ 12 callersMethodintern_frozen_owned_ty
Intern an OwnedTy as a single frozen TyId. Instead of eagerly converting the entire type tree into TyIds (O(N) allocations), wraps it in `Ty::Frozen(O
crates/lang_check/src/lib.rs:1128
↓ 12 callersMethodintern_output_ty
Intern an OwnedTy into this file's TypeStorage, creating fresh TyIds. Each TyVar(n) in the OwnedTy maps to a fresh variable (via a local HashMap). Th
crates/lang_check/src/lib.rs:1138
↓ 12 callersFunctionload_inline_aliases
Load inline type aliases from doc comments, applying CoW on the registry. Most files have no inline aliases, so the Arc is shared without cloning.
crates/lang_check/src/lib.rs:312
↓ 12 callersMethodmerge
Merge two attrsets. Fields from `other` override fields from `self` (right-biased).
crates/lang_ty/src/attrset.rs:54
↓ 12 callersFunctionrun_syntax_pipeline_for_file
Like [`run_syntax_pipeline`], but wraps all work in a tracing span tagged with the file path so sub-spans (`parse+lower`, `module_indices`, etc.) appe
crates/lang_ast/src/lib.rs:156
↓ 11 callersFunctionarb_ident
()
crates/lsp/src/pbt.rs:38
↓ 11 callersFunctionarb_literal
()
crates/lsp/src/pbt.rs:62
↓ 11 callersFunctionclassify
Helper: parse Nix source and classify it.
crates/lang_ast/src/classify.rs:449
↓ 11 callersMethodconstrain_equal
Constrain a ≡ b (bidirectional: a <: b and b <: a), locating any error at the current expression. Also records the equivalence in storage so that lat
crates/lang_check/src/constrain.rs:62
↓ 11 callersMethodget_mut
Get a mutable reference to the entry. Used internally.
crates/lang_check/src/storage.rs:122
↓ 11 callersFunctionmerge_attrset_intersection
Merge multiple attrsets in an intersection into a single attrset. The intersection of `{ foo: int }` and `{ bar: string }` is `{ foo: int, bar: string
crates/lang_check/src/collect.rs:1442
↓ 11 callersMethodoffset
Convert an LSP Position (UTF-16 character offset) to a byte offset.
crates/lsp/src/convert.rs:61
↓ 11 callersMethodprepare_rename
Prepare rename at a given position (validates rename is possible).
crates/lsp/tests/common/mod.rs:423
↓ 11 callersFunctionprim_ty_to_string
(prim: PrimitiveTy)
crates/lang_check/src/pbt/mod.rs:155
↓ 11 callersMethodwith_snapshot
Read from the DashMap snapshot. The callback receives the FileSnapshot and the parsed rnix Root. Returns `ContentModified` if the file hasn't been ana
crates/lsp/src/server.rs:184
↓ 10 callersMethodalloc_expr
(&mut self, expr: Expr, ptr: AstPtr)
crates/lang_ast/src/lower.rs:80
↓ 10 callersFunctioncheck_multifile_with_aliases
Infer a multi-file project with a custom TypeAliasRegistry. Pre-infers all dependency files (in order) to build ephemeral stubs, then infers the entr
crates/lang_check/src/tests.rs:222
↓ 10 callersFunctioncollect_diagnostics
Helper: type-check with CheckBuilder (which includes lowering diagnostics) and return just the diagnostics.
crates/lang_check/src/tests.rs:7689
↓ 10 callersFunctioncompare_types
Structural comparison of inferred vs declared types. Reports mismatches as human-readable strings. This is a best-effort check — it catches missing fi
crates/cli/src/main.rs:869
↓ 10 callersFunctioncomplete_at_markers_with_context
Run completions at marker positions with context stubs injected. Writes the context stubs to a temp directory, configures a ProjectConfig that matche
crates/lsp/src/completion.rs:2926
↓ 10 callersMethoddecl_locations
Look up source locations for a declaration name in `.tix` files. Works for type aliases, module names, and val declarations. Returns an empty slice fo
crates/lang_check/src/aliases.rs:308
↓ 10 callersMethodgenerate
Get the runtime generation config, if configured.
crates/lsp/src/project_config.rs:84
↓ 10 callersMethodget_var
If `id` is a variable, return a reference to its TypeVariable.
crates/lang_check/src/storage.rs:127
↓ 10 callersMethodinfer_prog_partial
Inference entry point that always produces an InferenceResult, even when errors occur. Errors are collected rather than short-circuiting — SCC groups
crates/lang_check/src/infer.rs:113
↓ 10 callersMethodinference_result
Convenience: get the InferenceResult if any inference data is available.
crates/lsp/src/state.rs:82
↓ 10 callersFunctionmake_arena
Build a single-node arena containing the given OutputTy and return (arena, root_ref). Used by compare_types tests which need an arena context.
crates/cli/src/main.rs:1634
↓ 10 callersFunctionmake_fixture
Create a fixture project with inline context stubs. Each context is a `(name, glob_patterns, stubs_content)` tuple. Stubs are written to `stubs/{name
crates/lsp/src/completion.rs:3332
↓ 10 callersFunctionremove_redundant_negations
Remove redundant negations from an intersection. When the intersection contains a positive type `T` with a known constructor and `Neg(S)` where `T` an
crates/lang_check/src/collect.rs:1222
↓ 10 callersMethodrename
Rename a symbol at a given position.
crates/lsp/tests/common/mod.rs:447
↓ 10 callersFunctionresolve_context_for_file
Resolve context args for a file based on `tix.toml` context definitions. When a context has a single stub entry, the returned `Arc` shares the cached
crates/lsp/src/project_config.rs:287
↓ 10 callersMethodtraverse_expr
(&mut self, module: &Module, expr: ExprId, scope: ScopeId)
crates/lang_ast/src/nameres.rs:177
↓ 9 callersMethodadd
(self, pol: Polarity)
crates/lang_check/src/collect.rs:35
↓ 9 callersFunctionfactor_shared_from_intersection
Factor shared members from an intersection of unions using the distributive law: `(A|C) & (B|C) = C | (A&B)`. When intersection members are unions sh
crates/lang_check/src/collect.rs:979
↓ 9 callersFunctionget_hints
(src: &str)
crates/lsp/src/inlay_hint.rs:125
↓ 9 callersFunctionget_name_type
(src: &str, name: &str)
crates/lang_check/src/tests.rs:958
↓ 9 callersFunctionget_tokens
Get semantic tokens for a source string. Returns the raw tokens with absolute positions (not delta-encoded) for easier assertions.
crates/lsp/src/semantic_tokens.rs:243
↓ 9 callersFunctionmake_sig
Helper: create a FileSignature from an OutputTy value.
crates/lang_check/src/coordinator.rs:646
↓ 9 callersFunctionpkg_with_children
Helper to build a sub-package-set entry with children.
crates/cli/src/gen_stubs.rs:2782
↓ 9 callersFunctionquery_workspace
Helper: create an AnalysisState with multiple files and query workspace symbols.
crates/lsp/src/workspace_symbols.rs:154
↓ 9 callersFunctionremove_tautological_pairs
Remove tautological pairs from a union: `T ∨ ¬T` = ⊤. When both a type and its negation appear, both are dropped since their union is the top type and
crates/lang_check/src/collect.rs:828
↓ 9 callersMethodrep
DSU representative for a TyId. Used at every `OutputTy::TyVar` emission site and when tracking polarity / cooccurrence membership.
crates/lang_check/src/collect.rs:175
↓ 9 callersFunctionresolve_include_globs
Expand the `[project] includes` glob patterns into concrete file paths. Patterns are relative to `config_dir` (the directory containing tix.toml). Re
crates/lsp/src/project_config.rs:346
↓ 9 callersFunctionsig_help_at
Helper: get signature help at a byte offset.
crates/lsp/src/signature_help.rs:331
↓ 9 callersMethoduri
(&self)
crates/lsp/src/test_util.rs:190
↓ 9 callersFunctionuri_to_path
Convert a file:// URI to a PathBuf, canonicalizing to resolve symlinks and `..` components. This ensures all downstream caches (snapshots, pending_tex
crates/lsp/src/server.rs:1484
↓ 8 callersFunctionabsorb_subsumed_union_members
Absorb subsumed attrsets in a union. In a union `A | B`, open attrset A subsumes open attrset B when: - Both are open - A has no dyn_ty (or A.dyn_ty =
crates/lang_check/src/collect.rs:906
↓ 8 callersFunctionarb_prim_value
Generate a random primitive value literal.
crates/lang_check/src/pbt/cyclic.rs:87
↓ 8 callersFunctionbuild_file_layers_with_sccs
Build inference layers preserving SCC grouping. Like `build_file_layers`, but each layer contains a list of `SccGroup`s rather than a flat file list.
crates/lang_check/src/file_graph.rs:50
↓ 8 callersMethodcmp
(&self, other: &Self)
crates/lang_ty/src/arena.rs:833
↓ 8 callersMethodedit
Send a full-text change for a file. Also writes the new text to disk so that `markers()` reads the updated content.
crates/lsp/tests/common/mod.rs:226
↓ 8 callersFunctionexpect_type_alias
(decls: &[TixDeclaration], idx: usize)
crates/comment_parser/src/tix_collect.rs:599
↓ 8 callersFunctionextract_lambda_param
Extract the parameter type from a function type.
crates/lsp/src/ty_nav.rs:255
↓ 8 callersFunctionfind_offset
(src: &str, pattern: &str)
crates/lsp/src/pbt_stubs.rs:252
↓ 8 callersFunctionfind_ref_expr
Find the ExprId of the first `Expr::Reference` whose name string matches `text`.
crates/lang_ast/src/tests.rs:21
↓ 8 callersFunctiongenerate_tix_file
( options: &std::collections::BTreeMap<String, OptionNode>, kind: &StubKind, )
crates/cli/src/gen_stubs.rs:592
↓ 8 callersFunctiongenerate_toml
Generate the tix.toml content from classified files.
crates/cli/src/init.rs:638
↓ 8 callersMethodintern_fresh_ty
Intern a ParsedTy with fresh type variables for each free generic var and alias resolution for Reference vars. Each call produces an independent "inst
crates/lang_check/src/lib.rs:1487
↓ 8 callersFunctionload_config
Read and parse a `tix.toml` file.
crates/lsp/src/project_config.rs:223
↓ 8 callersFunctionmake_snapshot
(repos: Vec<RepoResult>, timestamp: &str, version: &str)
crates/repo_check/src/diff.rs:168
↓ 8 callersFunctionmaybe_emit_source
Convenience: emit `@source` for an optional `NixPosition`, pushing to lines if matched.
crates/cli/src/gen_stubs.rs:43
↓ 8 callersFunctionoptions_to_attrset_ty
Convert an option tree (BTreeMap from the JSON) to a .tix attrset type string. When `emit_docs` is true, option descriptions are emitted as `##` doc c
crates/cli/src/gen_stubs.rs:342
↓ 8 callersFunctionprim_owned
Construct a `DiagTy` for a primitive type, for use in test assertions. `DiagTy::PartialEq` compares by display string, so two `DiagTy` values wrappin
crates/lang_check/src/diagnostic.rs:772
↓ 8 callersFunctionregistry_with_stub
------------------------------------------------------------------ Helper: create a registry with a stub file on disk --------------------------------
crates/lsp/src/goto_def.rs:780
↓ 8 callersFunctionresolve_import_types
Resolve import types using a caller-provided lookup function. For each scanned import target path: 1. Records navigation targets (for goto-def) regar
crates/lang_check/src/imports.rs:380
↓ 8 callersMethodty_for_expr
(&self, expr: ExprId)
crates/lang_check/src/lib.rs:436
↓ 8 callersMethodunwrap_named
Unwrap Named wrappers to get at the structural type.
crates/lang_ty/src/arena.rs:358
↓ 7 callersFunctionanalyze_condition
Analyze a condition expression to extract type narrowing information. Returns a default (empty) `NarrowInfo` if the condition doesn't match any recog
crates/lang_ast/src/narrow.rs:186
↓ 7 callersMethodany_node_matches
Returns true if any node in this type tree matches `pred`. Short-circuits on first hit. Uses a visited set for DAG safety.
crates/lang_ty/src/arena.rs:461
↓ 7 callersFunctionbuild_module_list
Build a Nix list literal from a slice of module sources. Empty slice returns `"[ ]"`.
crates/lsp/src/store_stubs.rs:384
↓ 7 callersFunctionclassification
(kind: NixFileKind)
crates/cli/src/init.rs:1787
↓ 7 callersMethodclear
Clear all cached state (used on registry reload).
crates/lang_check/src/coordinator.rs:623
↓ 7 callersFunctioncollect_type_expr
( mut pairs: Pairs<Rule>, ctx: &mut CollectCtx, )
crates/comment_parser/src/tix_collect.rs:283
↓ 7 callersMethodcompact_pinned_variables
Compact fully-determined variables in the range `[slots_before..len)`. A variable is "pinned" when the same concrete TyId appears in both its lower_b
crates/lang_check/src/type_table.rs:244
↓ 7 callersFunctiondiscover_all_nix_files
Discover `.nix` files to check under `root`. If `[project] includes` globs are configured, only files matching those patterns are returned (via `reso
crates/cli/src/config.rs:45
↓ 7 callersFunctionextract_alias_name
Extract the type alias name from an OutputTy, if it's a Named type.
crates/lsp/src/ty_nav.rs:335
↓ 7 callersFunctiongenerate_tix_file_with_docs
Like `generate_tix_file` but with explicit doc comment control.
crates/cli/src/gen_stubs.rs:600
↓ 7 callersFunctionget_name_type_partial
Helper: run partial inference (tolerates errors) and look up a name's type.
crates/lang_check/src/tests.rs:8385
↓ 7 callersFunctionhover
Try to produce hover information for the given cursor position.
crates/lsp/src/hover.rs:26
↓ 7 callersFunctionimport_errors_to_diagnostics
Convert import resolution errors into `TixDiagnostic`s for rendering in CLI or LSP. Each `ImportError` becomes a warning-level diagnostic attached to
crates/lang_check/src/imports.rs:547
↓ 7 callersMethodload_context_stubs
Parse a `.tix` source string as context stubs, loading any type aliases into `self.aliases` (so they can be referenced by val declarations) and return
crates/lang_check/src/aliases.rs:549
↓ 7 callersMethodlocate_err
Wrap a bare `InferenceError` with the current expression location.
crates/lang_check/src/lib.rs:1739
↓ 7 callersFunctionneg
Helper: create an OutputTy::Neg with an arena-interned inner.
crates/lang_check/src/collect.rs:1707
↓ 7 callersFunctionprim
(p: PrimitiveTy)
crates/lang_check/src/tests.rs:116
↓ 7 callersMethodrecord_deps
Record the import dependencies for a file. Replaces any previous entries.
crates/lang_check/src/coordinator.rs:542
↓ 7 callersMethodresolve
Resolve through Extern layers: if the root type is `Extern(owned)`, return a RootTy pointing into the external arena. Otherwise return self. This lets
crates/lang_check/src/tests.rs:42
↓ 7 callersFunctionresolve_import_types_from_stubs
Resolve import types from a pre-populated stubs HashMap. Thin wrapper around `resolve_import_types` for backward compatibility with code that has a `
crates/lang_check/src/imports.rs:528
← previousnext →101–200 of 2,574, ranked by callers