Portability | non-portable |
---|---|
Stability | experimental |
Maintainer | hpacheco@di.uminho.pt |
GHood: A graphical viewer for Hood
Created a cabal library package. Improved the search for the GHood.jar file, that is bundled with the library. Changed from Literate Haskell to plain Haskell for better haddock documentation support.
Hugo Pacheco, November 2008
Added ObserveM. Adapted imports to use GHC's hierarchical libraries.
Alcino Cunha, February 2004
Modified version of Hood/Observe.lhs to match GHood, the Graphical Haskell Object Observation Debugger, which is distributed as a Java class file archive GHood.jar. [Apart from two new hooks, modifications are at the end]
Claus Reinke, December 2000
The file is part of the Haskell Object Observation Debugger, (HOOD) July 2000 release. Actually this is all of this version of HOOD, apart from the documentation and examples...
HOOD is a small post-mortem debugger for the lazy functional language Haskell. It is based on the concept of observation of intermediate data structures, rather than the more traditional stepping and variable examination paradigm used by imperative language debuggers.
Copyright (c) Andy Gill, 1992-2000
- 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 ()
- newtype ObserverM a = ObserverM {}
- (<<) :: 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
- data Parent = Parent {
- observeParent :: !Int
- observePort :: !Int
- debugO :: IO a -> IO [CDS]
- data CDS
- type CDSSet = [CDS]
Documentation
observe :: Observable a => String -> a -> aSource
Our principle function and class
Contains a forall
typed observe (if supported).
O (forall a. Observable a => String -> a -> a) |
class Observable a whereSource
observer :: a -> Parent -> aSource
This reveals the name of a specific constructor. and gets ready to explain the sub-components. We put the context second so we can do eta-reduction with some of our definitions.
observers :: String -> (Observer -> a) -> aSource
This used used to group several observer instances together.
Observable Bool | |
Observable Char | |
Observable Double | |
Observable Float | |
Observable Int | |
Observable Integer | |
Observable () | |
Observable IOError | |
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) |
A simple state monad for placing numbers on sub-observations.
For advanced users, that want to render their own datatypes.
(<<) :: Observable a => ObserverM (a -> b) -> a -> ObserverM bSource
the infix (<<) is a shortcut for constructor arguments.
thunk :: Observable a => a -> ObserverM aSource
thunk is for marking suspensions.
observeBase :: Show a => a -> Parent -> aSource
Observe a base type
The strictness (by using seq) is the same as the pattern matching done on other constructors. We evaluate to WHNF, and not further.
observeOpaque :: String -> a -> Parent -> aSource
Observe a base type as an opaque
string.
Parent book-keeping information.
Parent | |
|