Copyright | License : BSD3 |
---|---|
Maintainer | hpacheco@di.uminho.pt |
Stability | experimental |
Portability | non-portable |
Safe Haskell | None |
Language | Haskell98 |
Debug.Observe
Contents
Description
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 -> a Source #
Our principle function and class
Contains a forall
typed observe (if supported).
Constructors
O (forall a. Observable a => String -> a -> a) |
class Observable a where Source #
Minimal complete definition
Methods
observer :: a -> Parent -> a Source #
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) -> a Source #
This used used to group several observer instances together.
Instances
Observable Bool Source # | |
Observable Char Source # | |
Observable Double Source # | |
Observable Float Source # | |
Observable Int Source # | |
Observable Integer Source # | |
Observable () Source # | |
Observable IOError Source # | |
Observable a => Observable [a] Source # | |
Observable a => Observable (Maybe a) Source # | |
Observable a => Observable (IO a) Source # | |
(Observable a, Observable b) => Observable (a -> b) Source # | |
(Observable a, Observable b) => Observable (Either a b) Source # | |
(Observable a, Observable b) => Observable (a, b) Source # | |
(Ix a, Observable a, Observable b) => Observable (Array a b) Source # | |
(Observable a, Observable b, Observable c) => Observable (a, b, c) Source # | |
(Observable a, Observable b, Observable c, Observable d) => Observable (a, b, c, d) Source # | |
(Observable a, Observable b, Observable c, Observable d, Observable e) => Observable (a, b, c, d, e) Source # | |
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 b infixl 9 Source #
the infix (<<) is a shortcut for constructor arguments.
thunk :: Observable a => a -> ObserverM a Source #
thunk is for marking suspensions.
observeBase :: Show a => a -> Parent -> a Source #
The strictness (by using seq) is the same as the pattern matching done on other constructors. We evaluate to WHNF, and not further.
Observe a base type
observeOpaque :: String -> a -> Parent -> a Source #
Observe a base type as an opaque
string.
Parent book-keeping information.
Constructors
Parent | |
Fields
|