Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,10 @@ Here's an example demonstrating how ``effectful`` can be used to implement a sim
import functools

from effectful.ops.types import Term
from effectful.ops.syntax import defop
from effectful.ops.syntax import defdata, defop
from effectful.ops.semantics import handler, evaluate, coproduct, fwd
from effectful.handlers.numbers import add

add = defdata.dispatch(int).__add__

def beta_add(x: int, y: int) -> int:
match x, y:
Expand Down
7 changes: 0 additions & 7 deletions docs/source/effectful.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,6 @@ Handlers
:members:
:undoc-members:

Numbers
^^^^^^^

.. automodule:: effectful.handlers.numbers
:members:
:undoc-members:

Pyro
^^^^

Expand Down
5 changes: 3 additions & 2 deletions docs/source/lambda_.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import functools
from typing import Annotated, Callable

from effectful.handlers.numbers import add
from effectful.ops.semantics import coproduct, evaluate, fvsof, fwd, handler
from effectful.ops.syntax import Scoped, defop, syntactic_eq
from effectful.ops.syntax import Scoped, defdata, defop, syntactic_eq
from effectful.ops.types import Expr, Interpretation, NotHandled, Operation, Term

add = defdata.dispatch(int).__add__


@defop
def App[S, T](f: Callable[[S], T], arg: S) -> T:
Expand Down
5 changes: 3 additions & 2 deletions docs/source/readme_example.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import functools

from effectful.handlers.numbers import add
from effectful.ops.semantics import coproduct, evaluate, fwd, handler
from effectful.ops.syntax import defop
from effectful.ops.syntax import defdata, defop
from effectful.ops.types import Term

add = defdata.dispatch(int).__add__


def beta_add(x: int, y: int) -> int:
match x, y:
Expand Down
1 change: 0 additions & 1 deletion docs/source/semi_ring.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import types
from typing import Annotated, Tuple, Union, cast, overload

import effectful.handlers.numbers # noqa: F401
from effectful.ops.semantics import coproduct, evaluate, fwd, handler
from effectful.ops.syntax import Scoped, defop
from effectful.ops.types import Interpretation, NotHandled, Operation, Term
Expand Down
1 change: 0 additions & 1 deletion effectful/handlers/jax/_handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

import tree

import effectful.handlers.numbers # noqa: F401
from effectful.ops.semantics import fvsof, typeof
from effectful.ops.syntax import (
Scoped,
Expand Down
246 changes: 0 additions & 246 deletions effectful/handlers/numbers.py

This file was deleted.

1 change: 0 additions & 1 deletion effectful/handlers/torch.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

import tree

import effectful.handlers.numbers # noqa: F401
from effectful.internals.runtime import interpreter
from effectful.internals.tensor_utils import _desugar_tensor_index
from effectful.ops.semantics import apply, evaluate, fvsof, handler, typeof
Expand Down
Loading