DrHylo: A tool for deriving hylomorphisms

[ bsd3, language, library, program ] [ Propose Tags ] [ Report a vulnerability ]

DrHylo is a tool for deriving hylomorphisms from a restricted Haskell syntax. It is based on the algorithm first presented in the paper Deriving Structural Hylomorphisms From Recursive Definitions at ICFP'96 by Hu, Iwasaki, and Takeichi. The generated code can be run with Pointless Haskell (http://hackage.haskell.org/cgi-bin/hackage-scripts/package/pointless-haskell), allowing the visualization of the recursion trees of Haskell functions.


[Skip to Readme]

Modules

[Last Documentation]

  • Language
    • Pointfree
      • Language.Pointfree.Parser
      • Language.Pointfree.Pretty
      • Language.Pointfree.Syntax
    • Pointwise
      • Language.Pointwise.Matching
      • Language.Pointwise.Parser
      • Language.Pointwise.Pretty
      • Language.Pointwise.Syntax

Flags

Automatic Flags
NameDescriptionDefault
splitbase

Choose the new smaller, split-up base package.

Enabled

Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.0.1, 0.0.2
Dependencies array (>=0.1), base (>=4), containers, haskell-src-exts (==0.4.4.1), mtl, pointless-haskell, pretty (>=1.0), syb [details]
License BSD-3-Clause
Author Alcino Cunha <alcino@di.uminho.pt>, Hugo Pacheco <hpacheco@di.uminho.pt>
Maintainer Hugo Pacheco <hpacheco@di.uminho.pt>
Category Language
Home page http://haskell.di.uminho.pt/wiki/DrHylo
Uploaded by HugoPacheco at 2008-12-09T10:37:32Z
Distributions
Reverse Dependencies 1 direct, 0 indirect [details]
Executables DrHylo
Downloads 2195 total (8 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs not available [build log]
All reported builds failed as of 2016-10-25 [all 15 reports]

Readme for DrHylo-0.0.2

[back to package description]
DrHylo

This cabal package can be installed with:

$ cabal install DrHylo

For a manual install, execute:

$ runhaskell Setup.lhs configure
$ runhaskell Setup.lhs build
$ runhaskell Setup.lhs install

DrHylo derives point-free hylomorphisms from restricted Haskell syntax.

Usage: DrHylo [OPTION...]
  -o[FILE]  --output[=FILE]  output FILE
  -i[FILE]  --input[=FILE]   input FILE
  -f        --fix            use fixpoints instead of hylomorphisms
  -w        --pointwise      do not convert to point-free
  -O        --observable     generate observable hylomorphisms

The module Sample.hs defines some Haskell definitions that are compliant with the DrHylo supported syntax.
As an example, we can generate observable hylomorphisms for the functions frm Sample.hs into some file Out.hs:

$ DrHylo -iSample.hs -oOut.hs -O

The resulting file Out.hs can be normally interpreted with GHC as long as we have the Pointless Haskell library installed.

$ ghci Out.hs -fglasgow-exts -XUndecidableInstances

Since we asked for observable hylomorphisms, we can inspect the recursion tree for hylomorphisms via GHood. Just make sure that you have the GHood library installed (available on Hackage). A sample execution is:

> let four = Succ $ Succ $ Succ $ Succ Zero
> runO $ print $ fact four