## Pointless Haskell

### Introduction

Pointless Haskell is library for point-free programming with recursion patterns defined as hylomorphisms. It is part of the UMinho Haskell Libraries that are being developed in the Research.PURe project. The core of the library is described in the following paper.

It also allows the visualization of the intermediate data structure of the hylomorphisms with GHood. This feature toghether with the DrHylo tool allows us to easily visualize recursion trees of Haskell functions. We first implemented this ideas using Generic Haskell, as presented in WFLP'03. We now take a different approach to genericity based on Personal/Alcino.PolyP.

### Download

The latest snapshot of the UMinho Haskell Libraries can be downloaded here. The modules that comprise Pointless Haskell are the following.

Module | Description |

`Debug.Observe` | Slightly modified GHood library. |

`Pointless.Combinators.Uncurried` | Point-free definitions of uncurried versions of the basic combinators. |

`Pointless.Combinators` | Point-free programming combinators. |

`Pointless.Examples.Examples` | Lots of examples. |

`Pointless.Functors` | Definition of functors, generic maps, and sum-of-products representation. |

`Pointless.Isomorphisms` | Auxiliary isomorphism definitions. |

`Pointless.Observe.Functors` | Definition of generic observations. |

`Pointless.Observe.RecursionPatterns` | Recursion patterns with observation of intermediate data structures. |

`Pointless.RecursionPatterns` | Definition of the typical recursion as hylomorphisms. |

### Usage

For the moment there is no documentation, but by reading the papers and looking at examples you should be able to learn it by yourself. It was only tested on GHC. I think that it should be easy to use it under Hugs.

Please send feedback to alcino@di.uminho.pt.

### Introduction

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.

### Download

See PUReSoftware.

### Usage

To use DrHylo, simply type `DrHylo -h`

at the command line, and follow instructions.

Usage: Personal/Alcino.DrHylo [OPTION...]
-o[FILE] --output[=FILE] output FILE
-i[FILE] --input[=FILE] input FILE

To run the resulting Haskell files you will need PointlessHaskell.

Please send feedback to alcino@di.uminho.pt.

# Point-free Program Transformation

This is a project where I, José Proença, worked on since April until October 2005. It was supervised by Jorge Sousa Pinto and Alcino Cunha, who supported and helped me during this time. The proposal is explained in more detailed in here. The results can be found in my internship report, here.

The project consists on two parts:

- Definition of two refactorings -- the conversion from point-wise to pointfree and the removal of guards;
- Automatic simplification and transformation of pointfree expressions.

### Refactorings in *HaRe*

In the begining of the project, I spent two weeks in Canterbury developing two refactorings to be part of *HaRe*:

A snapshot of the source code where these transformations are applied can be found here.

There are also some examples that can be found in the following links:

### The *SimpliFree* Tool

Allows for the automatic simplification and some program transformation of Haskell code, written in a point-free style. The technical report is available here. The SimpliFree tool is now available in the Uminho Haskell Libraries, that can be downloaded from the CVS repository.

This tool uses Haskell pattern matching to apply rules, by creating an auxiliary file with the functions where the strategies, rules and the pointfree terms are defined. In spite of the fact that this approach meant to be simpler than most approaches where a pattern matching algorithm is defined, the definitions of functions that apply a rule were more complex than expected.

In September, this tool, together with the DrHylo tool and the Pointless library, were presented in IFL'05 workshop.
The presentation "A Framework for Point-free Program Transformation", shown in this workshop, can be found here.

The SimpliFree tool was also presented in the PURe Workshop 2005. The slides can be found here.