DanBurton/tardis

Haskell

114

64 commits

updated Jan 12, 2026

See the code

README

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-2026 Dan Burton

Contributors

DanBurton

61 commits

konsumlamm

1 commits

sheaf

1 commits

vmchale

1 commits

DanBurton/tardis

Haskell

114

64 commits

updated Jan 12, 2026

See the code

README

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-2026 Dan Burton

Contributors

DanBurton

61 commits

konsumlamm

1 commits

sheaf

1 commits

vmchale

1 commits

Languages

Haskell

97.7%

Makefile

2.3%