tardis: Bidirectional state monad transformer

[ bsd3, control, library ] [ Propose Tags ]

A Tardis is a combination of both a forwards and a backwards state transformer, providing two state values that "travel" in opposite directions.

A detailed description of what a Tardis is and how to use it can be found in the documentation for Control.Monad.Tardis.


[Skip to Readme]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.2.0.0, 0.3.0.0, 0.4.1.0, 0.4.2.0, 0.4.3.0, 0.4.4.0, 0.5.0
Change log ChangeLog.md
Dependencies base (>=4.8 && <5), mmorph (>=1 && <2), mtl (>=2 && <3) [details]
License BSD-3-Clause
Author Dan Burton
Maintainer danburton.email@gmail.com
Category Control
Home page https://github.com/DanBurton/tardis
Bug tracker https://github.com/DanBurton/tardis/issues
Source repo head: git clone git://github.com/DanBurton/tardis.git
this: git clone git://github.com/DanBurton/tardis.git(tag tardis-0.4.1.0)
Uploaded by DanBurton at 2024-01-16T00:58:12Z
Distributions NixOS:0.5.0, Stackage:0.5.0
Reverse Dependencies 5 direct, 3 indirect [details]
Downloads 4603 total (38 in the last 30 days)
Rating 2.0 (votes: 1) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2024-01-16 [all 1 reports]

Readme for tardis-0.5.0

[back to package description]

TardisT

build status

The State monad allows you to send information forwards to the future, or to receive such information from the past. The Reverse State monad allows you to do the reverse: send information backwards to the past, or receive information from the future.

TardisT is a monad transformer that provides state operations that allow you to send information to both the future and the past, as well as receive information from both directions. It is isomorphic to a StateT on top of a ReverseStateT, or vice-versa.

See test/Example.hs for an example.


This was inspired by Luke Palmer's blog post on the "reverse state monad".

http://lukepalmer.wordpress.com/2008/08/10/mindfuck-the-reverse-state-monad/

See also:

http://panicsonic.blogspot.com/2007/12/backwards-state-or-power-of-laziness.html


(c) 2012 Dan Burton