[Haskell-cafe] Re: I/O interface
Andre Pang
ozone at algorithm.com.au
Thu Jan 20 07:45:03 EST 2005
On 20/01/2005, at 11:06 PM, Keean Schupke wrote:
> I find it no harder than writing with monads for example... certainly
> there are some
> tricky things going on in both... but that doesn't stop people using
> monads for IO,
> state etc.
>
> Syntactic sugar over the top for instance and implementation
> definitions is something
> we are working on (using template-haskell) - so that end of things can
> certainly be
> made neater for the user.
The syntactic sugar is the killer. (Using monads is really no fun if
you don't have do notation, for example. Doable: yes. Pretty:
definitely not!) Even if you use Template Haskell to try to implement
the syntactic sugar, you're very limited by the splice $(...) notation
at the call site. I've always argued that Haskell really should have a
full-blown macro system: it would really help with Haskell and EDSLs,
and of course for integrating these kinds of libraries. TH is 90% of
the way there, and with a bit more thought, those pesky splices could
just magically disappear ... ;)
> The big problem I guess is error messages - and that would require
> some user
> defined way of throwing compile time errors.
Yes, also agreed. I did some similar Haskell<->OO integration work,
and the type errors which appeared when something went wrong are quite
awesome. User-defined compile-time errors would be fantastic, but that
would require quite a lot of effort.
--
% Andre Pang : trust.in.love.to.save <http://www.algorithm.com.au/>
More information about the Haskell-Cafe
mailing list