[Haskell-cafe] More on the random idea
Duncan Coutts
duncan.coutts at worc.ox.ac.uk
Mon May 28 15:08:43 EDT 2007
On Mon, 2007-05-28 at 10:49 +0100, Andrew Coppin wrote:
> Simon Peyton-Jones wrote:
> > | It's too large and complicated to use for small things. E.g., if you
> > | want to just dash off a little something that needs to evaluate an
> > | expression... Well, you can use the GHC API. But this is highly
> > | nontrivial. You get the impression it was added later, and the internal
> > | structure of GHC is so complex that it makes it hard to write a
> > | lightweight interface to it.
> >
> > It's certainly true that GHC's API was added later. But there is no real reason why it should not be easy to use. We'd be keen to support anyone who wanted to help make that happen. At the moment there's a bit of chicken and egg problem.
> >
> In my case, all I was actually trying to do was implement GHCi. (It's a
> good first test.) It took me a few hours, but I did in fact eventually
> get it to work. My plan was to make a program that's essentially GHCi,
> but accepts commands remotely via TCP.
You looked at the source to GHCi itself I presume? It uses the GHC API,
so it's a good place to start with building a variant of GHCi that uses
the GHC API :-)
Duncan
More information about the Haskell-Cafe
mailing list