Papers
I aim to keep the latest version of papers I write here
along with up-to-date BiBTeX entries for them. You can also
get the latest BiBTeX entries for all papers in
a single file.
Typing Template Haskell: Soft Types
By Ian Lynagh, August 2004.
[A4 ps]
[bib]
Abstract
In this paper we give the motivation for an improved
type system for Template Haskell, a recent compile-time
meta-programming extension for Haskell, and explain what
properties we would like the type system to have and
why. We then present a type system, based on
soft types, for a simplified Template
Haskell-like language that has these properties. We
prove that it has principal types and describe an
algorithm that implements type inference for this type
system.
Template Haskell: A Report From The Field
By Ian Lynagh, May 2003.
[A4 ps]
[bib]
Abstract
We have now had a year since the introductory Template
Haskell paper was written. In this report I look back
upon what I have used it for in this time giving an idea
of the ways in which I have found it useful and
explaining the problems I have encountered with it.
In most cases there are existing tools that provide the
functionality we can implement with Template Haskell.
The advantages Template Haskell offers here are a single
syntax and semantics to learn and it operates without a
preprocessor phase which simplifies build systems.
Template Haskell is still young, so it is still lacking
in functionality necessary for some applications. By
highlighting what was needed most we hope to guide the
direction of future development to give the best payoff.
There are some applications for which the current design
is insufficient. The key problem is that type and
strictness information is not available to applications,
so safety conditions for some transformations on
abstract syntax trees we may wish to do cannot be
checked easily.
Unrolling and Simplifying Expressions with Template Haskell
By Ian Lynagh, May 2003.
[A4 ps]
[bib]
Abstract
We introduce a handful of modules for manipulating
Template Haskell datastructures, building up to modules
that allow simplification and recursion unrolling of
Haskell code. To illustrate their use, and to
demonstrate the performance improvements that motivate
this work, we also discuss an example application
Fraskell, showing how we can get more
than an order of magnitude performance increase with
minimal changes to the source.
Back to the main page.
|