Interpret haskell within haskell.

Frank Atanassow
Fri, 20 Dec 2002 13:43:07 +0100

Lauri Alanko wrote (on 20-12-02 11:26 +0200):
> For what it's worth, I will probably be doing my MSc thesis on
> adapting eval (and reflection in general) to a statically typed
> language. Essentially you need a run-time representation of the
> environment and the typing context, and a type system which groks the
> relationship between run-time and static types.
> Strangely enough, I haven't found any real research on this particular
> subject. There's lots of work on related areas, eg. dynamic types and
> intensional polymorphism, but nothing that's really motivated by eval
> and reflection.
> Any suggestions for references are welcome. :)

There is quite a bit of work on staged evalution, metaprogramming,
quasiquotation, reflection and run-time code generation in typed and ML-like
languages. It's a very active and, IMO, promising area of research.

Here is just a sample. Just follow the bibliography trail, or use CiteSeer:

  Rowan Davies and Frank Pfenning. A modal analysis of staged computation. In
  POPL '96, pp. 258-270, 1996.

  Jean Goubault-Larrecq. Logical Foundations of Eval/Quote Mechanisms, and the
  Modal Logic S4.

  MetaML homepage

  Walid Taha. Multi-Stage Programming: Its Theory and Applications. PhD
  thesis, OGI, 1999.

  (also see Related Systems at the bottom of this page)

  Tim Sheard and Simon Peyton Jones. Template Meta-programming for Haskell.
  Haskell Workshop, Pittsburgh, October 2002.

  Mark Shields, Tim Sheard and Simon Peyton Jones. Dynamic Typing as Staged
  Type Inference. POPL '98.

  Eugenio Moggi et al. An Idealized MetaML: Simple, and More Expressive.
  ESOP '99.

  Pierre Leleu. A Modal Lambda Calculus with Iteration and Case Constructs.

  Philip Wickline, Peter Lee and Frank Pfenning. Run-time Code Generation and
  Modal-ML. PLDI '98.

Hope this helps!