- observe :: Observable a => String -> a -> a
- newtype Observer = O (forall a. Observable a => String -> a -> a)
- type Observing a = a -> a
- class Observable a where
- runO :: IO a -> IO ()
- printO :: Show a => a -> IO ()
- putStrO :: String -> IO ()
- (<<) :: Observable a => ObserverM (a -> b) -> a -> ObserverM b
- thunk :: Observable a => a -> ObserverM a
- send :: String -> ObserverM a -> Parent -> a
- observeBase :: Show a => a -> Parent -> a
- observeOpaque :: String -> a -> Parent -> a
- debugO :: IO a -> IO [CDS]
- data CDS

# The main Hood API

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

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

class Observable a whereSource

Observable Bool | |

Observable Char | |

Observable Double | |

Observable Float | |

Observable Int | |

Observable Integer | |

Observable () | |

Observable Dynamic | |

Observable SomeException | |

Observable a => Observable [a] | |

Observable a => Observable (IO a) | |

Observable a => Observable (Maybe a) | |

(Observable a, Observable b) => Observable (a -> b) | |

(Observable a, Observable b) => Observable (Either a b) | |

(Observable a, Observable b) => Observable (a, b) | |

(Ix a, Observable a, Observable b) => Observable (Array a b) | |

(Observable a, Observable b, Observable c) => Observable (a, b, c) | |

(Observable a, Observable b, Observable c, Observable d) => Observable (a, b, c, d) | |

(Observable a, Observable b, Observable c, Observable d, Observable e) => Observable (a, b, c, d, e) |

The main entry point; run some IO code, and debug inside it.

An example of using this debugger is

runO (print [ observe +1 (+1) x | x <- observe xs [1..3]])

[2,3,4] -- +1 { 1 -> 2 } -- +1 { 2 -> 3 } -- +1 { 3 -> 4 } -- xs 1 : 2 : 3 : []

Which says, the return is `[2,3,4]`

, there were `3`

calls to +1
(showing arguments and results), and `xs`

, which was the list
`1 : 2 : 3 : []`

.

# 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 :: Show a => a -> Parent -> aSource

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