proposal: standardize interface to Haskell' implementations
simonpj at microsoft.com
Mon Feb 20 10:21:27 EST 2006
| (*) 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.
A reasonable suggestion, but I'm unsure what you actually have in mind.
I think that perhaps you mean that Haskell' should specify a (Haskell)
library through which one can compile, load, and execute Haskell
programs? Is that right? That is, you have in mind precisely the sort
of thing that GHC-as-a-library tries to offer? I ask because that
isn't exactly what Java reflection, for example, offers.
If that is what you have in mind, then yes indeed, it would be great to
have such an interface specified. But it's a big task. The data types
involved are large, and there are lots of design choices. We've
simplified the problem in GHC by exposing some of GHC's internal types
(e.g. Type, Class, TyCon, Id etc) which have themselves evolved over
time. And that's before you start asking about what interfaces are
suitable for loading, renaming, typechecking, optimising etc.
I, for one, would love it if you and others felt able to contribute to
the Haskell-as-a-library interface (i.e. what it should look like to the
client). Whether we'd be anywhere near done for Haskell' I'm less
There's a (GHC-specific) Wiki page for suggestions about GHC as a
library, which might be good place to start.
More information about the Haskell-prime