hood-off-0.2: Dummy package to disable Hood without having to remove all the calls to observe

Safe HaskellNone

Debug.Hood.Observe

Contents

Synopsis

The main Hood API

observe :: Observable a => String -> a -> aSource

observe observes data structures in flight.

An example of use is map (+1) . observe "intermeduate" . map (+2)

In this example, we observe the value that flows from the producer map (+2) to the consumer map (+1).

observe can also observe functions as well a structural values.

newtype Observer Source

Constructors

O (forall a. Observable a => String -> a -> a) 

type Observing a = a -> aSource

class Observable a whereSource

Methods

observer :: a -> Parent -> aSource

observers :: String -> (Observer -> a) -> aSource

Instances

runO :: IO a -> IO ()Source

printO :: a -> IO ()Source

For advanced users, that want to render their own datatypes.

(<<) :: Observable a => ObserverM (a -> b) -> a -> ObserverM bSource

thunk :: Observable a => a -> ObserverM aSource

observeBase :: a -> Parent -> aSource

observeOpaque :: String -> a -> Parent -> aSource

For users that want to write there own render drivers.

debugO :: Monad m => t -> m [a]Source