
Hugo Pacheco wrote:
The library also features the visualization of the intermediate data structure of hylomorphisms with GHood.
I hadn't come across GHood and Hood before, and they look quite a useful addition to the toolbox. http://www.haskell.org/hood says "The current released version of HOOD is the July 2000 release, but there is also a patch to all HOOD to work with GHC 5.00.". The Observe.lhs there doesn't immediately work with current GHC. Has anyone got an updated version, or is this available in some more recent library or package ? Or, I may have misunderstood, and Debug.Trace may do everything that Hood did. Still, a working Hood would be useful to get the nice visualisations of GHood. Thanks - Simon

In fact, Hood is just the module Debug.Observe.GHood just extends Debug.Observe with some more constructs to handle visualizations, for instance, it adds a temporal dimension to observations. This means that you can use the GHood cabal package nonetheless, and be able to use both GHood graphically or textually (the features of Hood). GHood gives you both. Whenever you use runO, it will call the Java applet with the graphical visualization but still output the textual trace from Hood. As an example, just import Debug.Observe (the GHood one), run ghci and type
runO $ print $ (length . observe "List Int" .concat) [[1,2],[3,4]]
I suggest you install the cabal package and try the sample module form the
Hood homepage:
http://www.haskell.org/hood/downloads/Main.hs
Feel free to ask for anything.
Cheers,
hugo
On Sat, Dec 6, 2008 at 9:59 PM, Simon Michael
Hugo Pacheco wrote:
The library also features the visualization of the intermediate data structure of hylomorphisms with GHood.
I hadn't come across GHood and Hood before, and they look quite a useful addition to the toolbox.
http://www.haskell.org/hood says "The current released version of HOOD is the July 2000 release, but there is also a patch to all HOOD to work with GHC 5.00.". The Observe.lhs there doesn't immediately work with current GHC. Has anyone got an updated version, or is this available in some more recent library or package ?
Or, I may have misunderstood, and Debug.Trace may do everything that Hood did. Still, a working Hood would be useful to get the nice visualisations of GHood.
Thanks - Simon
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
-- www.di.uminho.pt/~hpacheco

Hugo, I thought "this Hood stuff is so old, there's no point checking hackage". Silly me! I did cabal update; cabal install GHood on this mac and tried your example:
As an example, just import Debug.Observe (the GHood one), run ghci and type
runO $ print $ (length . observe "List Int" .concat) [[1,2],[3,4]]
and it fired up the graphical Java applet without any further setup. Very nice! I don't yet know what a hylomorphism is and thought your pointless-haskell package might be one of those semi-joke projects, but now I wonder if it's something that I'll need in order to use (G)Hood with real-world code. I guess I'll find out. Thank you!

On Sat, Dec 6, 2008 at 11:13 PM, Simon Michael
Hugo,
I thought "this Hood stuff is so old, there's no point checking hackage". Silly me! I did cabal update; cabal install GHood on this mac and tried your example:
As an example, just import Debug.Observe (the GHood one), run ghci and
type
runO $ print $ (length . observe "List Int" .concat) [[1,2],[3,4]]
and it fired up the graphical Java applet without any further setup. Very nice!
I don't yet know what a hylomorphism is and thought your pointless-haskell package might be one of those semi-joke projects, but now I wonder if it's something that I'll need in order to use (G)Hood with real-world code.
It shouldn't be. Pointless Haskell is for point-free programming and it is quite arguable if that is real-world Haskell. The main advantage is that it is easier to reason about programs, that is why it recursion patterns such as hylomorphisms are fun. But by no means you need it for using (G)Hood in your applications.
I guess I'll find out. Thank you!
You can always run some of the examples from the Pointless Haskell library or just have a quick look at http://haskell.di.uminho.pt/wiki/Pointless+Haskell/Examples. Cheers, hugo
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
-- www.di.uminho.pt/~hpacheco

On 2008 Dec 6, at 18:13, Simon Michael wrote:
I don't yet know what a hylomorphism is and thought your pointless- haskell package might be one of those semi-joke projects, but now I wonder if it's something that I'll need in order to use (G)Hood with real-world code.
Not a joke. People who reason about programs (more of a mathematical discipline than a programming one) like to use the tools of category theory (a generalization of set theory). At the category-theoretical level, the important parts of Haskell are functors (functions that operate on functions; they perform transformations on types) and types (equivalent to sets); values don't actually appear anywhere, they stay hidden inside types. So to use those tools, you need to remove the values; values are also known as "points", hence "point-free" or "point-less" (a bit of a joke, that) programming. Morphisms (catamorphism, hylomorphism, etc.) are category-theoretical transformations, which are represented in Haskell as functors. Many common functional "patterns" are derived from these reflections of category theory transformations in the language. -- brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery@kf8nh.com system administrator [openafs,heimdal,too many hats] allbery@ece.cmu.edu electrical and computer engineering, carnegie mellon university KF8NH
participants (3)
-
Brandon S. Allbery KF8NH
-
Hugo Pacheco
-
Simon Michael