simple-observer-0.0.1: The Observer pattern

Control.Observer.Synchronous

Description

A synchronous implementation of the Subject typeclass, , based on Observable.hs by Bastiaan Heeren, originally from http://www.cs.uu.nl/wiki/bin/view/Afp0607/ExerciseWXHaskell

The Subject implementation defined in this module uses MVars to provide a simple and threadsafe synchronous implementation of the Observer design pattern.

Note that no constructor for Sub is exported: client code must use the createSub smart constructor.

Synopsis

Documentation

data Sub a Source

Threadsafe synchronous Subject implementation.

Instances

Subject (Sub a) a 

createSub :: a -> IO (Sub a)Source

Smart constructor for Sub.