monad-control-aligned

Just like monad-control, except less efficient, and the monadic state terms are all * -> *

https://github.com/athanclark/monad-control#readme

Version on this page:0.0.1.1
LTS Haskell 22.14:0.0.2.1
Stackage Nightly 2024-03-28:0.0.2.1
Latest on Hackage:0.0.2.1

See all snapshots monad-control-aligned appears in

BSD-3-Clause licensed by Athan Clark
Maintained by Athan Clark
This version can be pinned in stack with:monad-control-aligned-0.0.1.1@sha256:ee6f628bca31b6a92a24059389a8d5a9b67c16f1420787e583d824c6bfd025ee,1389

Module documentation for 0.0.1.1

  • Control
    • Control.Monad
      • Control.Monad.Trans
        • Control.Monad.Trans.Control
          • Control.Monad.Trans.Control.Aligned

monad-control-aligned

An alternative edition of monad-control that forces all state data types to:

  • be exposed at the Constraint level
  • be aligned s.t. the state is of kind * -> *, wherein the subject data type is indeed the monadic value a in m a; this opposes the StateT and WriterT definitions, whos’ state types are in the form of (a, s); opposing curried type application indeed. Our edition enforces instances in the form of (,) s - thus leaving the last applied type polymorphic, achieving our goal of * -> * aligned [tm] state type.

This just allows us to use extractable-singleton to run our state type - useful for obtaining the subject data while running in a lifted context - basically exactly the same as what monad-unlift does.