Example Code

for the operational package.

List of examples

LogicT.hs
Oleg Kiselyov's LogicT monad transformer.
ListT.hs
Correct implementation of the list monad transformer.
PoorMansConcurrency.hs
Koen Claessen's poor man's concurrency monad, implements cooperative multitasking.
State.hs
Very simple example showing how to implement the state monad.
TicTacToe.hs
The game of TicTacToe. Mix and mash humans and AI as you like; players are implemented in a special monad that looks like there is only one player playing.
WebSessionState.lhs
CGI Script that is written in a style seems to require exeution in a persistent process, but actually stores a log of the session in the client.

Download

Download a tar.gz archive of all the current examples.