[Haskell-cafe] Haskell versus Lisp

Jacques Carette carette at mcmaster.ca
Fri Sep 16 13:03:13 EDT 2005


Glynn Clements wrote:

>Every other language (including Haskell) tends to have the problem
>that eventually you will encounter a situation where the language's
>own worldview gets in the way.
>
>Or, to put it another way: if Haskell is so flexible, why do we need
>Template Haskell? I can't imagine a "Template Lisp"; it would just be
>Lisp.
>  
>
I was just about to say something very similar.  So to add a new point:  
Why is there a partial evaluator for full Scheme 
(http://www.informatik.uni-freiburg.de/proglang/software/pgg/) but none 
for full Haskell (or full ML for that matter)?  The problem is 
considerably harder - see the papers listed at 
http://partial-eval.org/scheme_pe.html.

The issue there is definitely one of worldview.  The Haskell type system 
(and the ML type system as well) have a wordview that is incompatible 
with very powerful code manipulations.  That is why Template Haskell is 
*untyped*, and why MetaOCaml (www.metaocaml.org) puts serious 
restrictions on what can be done with code so as to prevent unsoundness.

However, Gilmore's work on Intensional Type Theory 
(http://www.cs.ubc.ca/spider/gilmore/) looks very promising to me as a 
method to attack this worldview problem.  Others have tried to use modal 
logic (mostly S4), but I personally don't believe that is the right way 
to go.

Jacques

PS: yes, I know about 
http://www.cs.chalmers.se/~rjmh/PECourse/Exercises/PE.html and 
http://www.informatik.uni-freiburg.de/proglang/research/software/mlope/.


More information about the Haskell-Cafe mailing list