diff --git a/crates/formality-core/src/derive_links.rs b/crates/formality-core/src/derive_links.rs
index d56e9ae1e..b6cacb756 100644
--- a/crates/formality-core/src/derive_links.rs
+++ b/crates/formality-core/src/derive_links.rs
@@ -5,7 +5,6 @@
pub use crate::cast::DowncastTo;
pub use crate::cast::UpcastFrom;
-pub use crate::fixed_point;
pub use crate::fold::Fold;
pub use crate::fold::SubstitutionFn;
pub use crate::parse;
diff --git a/crates/formality-core/src/fixed_point.rs b/crates/formality-core/src/fixed_point.rs
deleted file mode 100644
index 2d64687ac..000000000
--- a/crates/formality-core/src/fixed_point.rs
+++ /dev/null
@@ -1,83 +0,0 @@
-use std::cell::RefCell;
-use std::fmt::Debug;
-use std::hash::Hash;
-use std::thread::LocalKey;
-
-mod stack;
-pub use stack::FixedPointStack;
-
-pub fn fixed_point(
- tracing_span: impl Fn(&Input) -> tracing::Span,
- storage: &'static LocalKey>>,
- args: Input,
- default_value: impl Fn(&Input) -> Output,
- next_value: impl FnMut(Input) -> Output,
-) -> Output
-where
- Input: Value,
- Output: Value,
-{
- stacker::maybe_grow(32 * 1024, 1024 * 1024, || {
- FixedPoint {
- tracing_span,
- storage,
- default_value,
- next_value,
- }
- .apply(args)
- })
-}
-
-struct FixedPoint
-where
- Input: Value,
- Output: Value,
-{
- tracing_span: TracingSpan,
- storage: &'static LocalKey>>,
- default_value: DefaultValue,
- next_value: NextValue,
-}
-
-pub trait Value: Clone + Eq + Debug + Hash + 'static {}
-impl Value for T {}
-
-impl
- FixedPoint
-where
- Input: Value,
- Output: Value,
- DefaultValue: Fn(&Input) -> Output,
- NextValue: FnMut(Input) -> Output,
- TracingSpan: Fn(&Input) -> tracing::Span,
-{
- fn apply(&mut self, input: Input) -> Output {
- if let Some(r) = self.with_stack(|stack| stack.search(&input)) {
- tracing::debug!("recursive call to {:?}, yielding {:?}", input, r);
- return r;
- }
-
- self.with_stack(|stack| {
- let default_value = (self.default_value)(&input);
- stack.push(&input, default_value);
- });
-
- loop {
- let span = (self.tracing_span)(&input);
- let _guard = span.enter();
- let output = (self.next_value)(input.clone());
- tracing::debug!(?output);
- if !self.with_stack(|stack| stack.update_output(&input, output)) {
- break;
- } else {
- tracing::debug!("output is different from previous iteration, re-executing until fixed point is reached");
- }
- }
-
- self.with_stack(|stack| stack.pop(&input))
- }
-
- fn with_stack(&self, f: impl FnOnce(&mut FixedPointStack) -> R) -> R {
- self.storage.with(|v| f(&mut *v.borrow_mut()))
- }
-}
diff --git a/crates/formality-core/src/fixed_point/stack.rs b/crates/formality-core/src/fixed_point/stack.rs
deleted file mode 100644
index 906ebf8ea..000000000
--- a/crates/formality-core/src/fixed_point/stack.rs
+++ /dev/null
@@ -1,89 +0,0 @@
-use super::Value;
-
-pub struct FixedPointStack {
- entries: Vec>,
-}
-
-impl Default for FixedPointStack {
- fn default() -> Self {
- Self {
- entries: Default::default(),
- }
- }
-}
-
-struct StackEntry {
- /// Input.
- input: Input,
-
- /// Current output, updated during computation as we approach a fixed point.
- output: Output,
-
- /// Initially false; set to true when the outputs of this rule
- /// are observed while it is being evaluated.
- has_dependents: bool,
-}
-
-impl FixedPointStack
-where
- Input: Value,
- Output: Value,
-{
- /// Access the top frame on the stack, which should be for `input`.
- fn top_frame(&mut self, input: &Input) -> &mut StackEntry {
- let top = self.entries.last_mut().unwrap();
- assert_eq!(top.input, *input);
- top
- }
-
- /// Search backwards through the stack, looking for the given input.
- ///
- /// If it is found, return `Some` with the current outputs, and mark it
- /// as needing fixed point iteration.
- ///
- /// If not, return `None`.
- ///
- /// The fixed-point mark is returned when the stack is [popped](`Self::pop`) and is used
- /// as part of the fixed point algorithm.
- pub fn search(&mut self, input: &Input) -> Option