proposal: standardize interface to Haskell' implementations

Claus Reinke claus.reinke at
Sun Feb 12 17:42:43 EST 2006

[an innocent question on ghc-users just reminded me of another
 missed opportunity in previous Haskell definitions: by chosing to
 ignore the very idea of implementations, they have left tool 
 implementors in a limbo.]

these days, there is some momentum for providing Haskell with
various tools for refactoring, documentation, profiling, tracing, 
instance generators, analyzers, pre-processors for extensions,
editor modes, interactive interfaces (textual, graphical, visual),
.. and even first ides, but all that is hampered by the lack of a 
standardized interface to functionality that exists in every single 
Haskell implementation: parsing, type checking, AST, (pretty 
printing,) semantic information, (evaluation).

that functionality is common to most tools, hard (and 
unneccessary) work to reimplement, and almost impossible to 
keep up to date, diverting precious man-power from small teams
trying to provide much needed tools.

all we have at the moment is the haskell-src part of the libraries
Language.Haskell.{Parser,Pretty,Syntax), and some Hugs- or
GHC-specific APIs (Hugs Server API, package GHC), or other
frontends like Programatica, etc..

compare that with Lisp, Smalltalk, SML/NJ and the like, where 
reflection support means that tool builders get a fantastic head 
start by being able to reuse available implementation functionality. 

if you think that isn't the job of a language standard, think again;
for instance, there is the ADA Semantic Interface Specification 
(ASIS) - "an interface between an Ada environment (as defined 
by ISO/IEC 8652:1995) and any tool or application requiring 
information from it." 

I am aware that the precise form of, say, the GHC API is still
in flux, but I think Haskell' is a great chance to make a start on
standardizing the basics(*), so that those tools will be available 
for *all* conforming Haskell' implementations, and so that the 
tool implementers are freed to focus on their core functionality!


(*) a standard haskell' api providing the commands of ghci/hugs
    style interactive systems would be a start, together with an
    annotated AST, parser/typer/pretty printer. more detailed
    specifications could be left for future revisions.

More information about the Haskell-prime mailing list