effable: A data structure for emission plans

This is a package candidate release! Here you can preview how this package release will appear once published to the main package index (which can be accomplished via the 'maintain' link below). Please note that once a package has been published to the main package index it cannot be undone! Please consult the package uploading documentation for more information.

[maintain] [Publish]

A data structure for emission plans. For details, refer to the README.md file.


[Skip to Readme]

Properties

Versions 0.1.0.0, 0.1.0.0, 0.2.0.0
Change log None available
Dependencies base (>=4 && <5), text (<3) [details]
License MIT
Copyright Carl W
Author Carl W
Maintainer Carl W
Category Data
Home page https://github.com/carlwr/effable#readme
Bug tracker https://github.com/carlwr/effable/issues
Source repo head: git clone https://github.com/carlwr/effable
Uploaded by carlwr at 2026-02-16T18:43:33Z

Modules

[Index] [Quick Jump]

Flags

Manual Flags

NameDescriptionDefault
doctest

enable doctests

Disabled
suppress-module-prefixesDisabled

Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees


Readme for effable-0.1.0.0

[back to package description]

Effable

A data structure for emission plans

GitHub License Hackage Version


-- λ> import Effable
-- λ> :info Effable

type Effable :: (* -> *) -> * -> *
newtype Effable m b

instance Semigroup   (Effable m b)
instance Monoid      (Effable m b)

instance Functor     (Effable m)
instance Applicative (Effable m)
instance Monad       (Effable m)

instance Alternative (Effable m)
instance MonadPlus   (Effable m)

instance IsString b => IsString (Effable m b)

Links:



An Effable m b is

Why?

Compared to just working in the monadic m b context, Effable brings one particular distinguishing feature:

An Effable can undergo decoration with emission wrappers (wrap, wrapInside) after which it is still a pure Effable.

This means that even after having been modified with wrappers, or any other supported transformation...

Emission wrappers can be applied to granular constituents of an Effable as the user code is building it. The Effable machinery will track the wrappers behind-the-scenes through all supported transformations so that the eventual emission respects them.

Caveats and usage scope

Intuition

Effables are kept pure through all supported transformations by representing all possible outcomes of actions that affect structure. Running the actions is deferred to emission time. This comes with the cost of the internal representation carrying a complexity proportional to all possible outcomes.

Metaphorically, Effable is the many-worlds interpretation of actions meaning actions can be represented without them interacting with the actual world (= purity) and its representation is not collapsed to an outcome until it is observed (= run).

"Effable"?

Effable as in sayable or utterable.

Or, Eff-able as in able to be effected or effectuated - something with the potential of becoming effects.