[Haskell-cafe] Domain Specific Languages and better Error messages

Victor Miller victorsmiller at gmail.com
Tue Feb 7 19:09:16 CET 2012


This week, at work, I've been attending a workshop which is concerned with
writing (actually rewriting) a domain specific language that we've been
using.    Although I've only known Haskell for four months, I can see that
it's infected my brain, since I kept seeing Haskell solutions to all sorts
of problems that were coming up.  This DSL was written by two demon
programmers in C.  They've made many ad-hoc choices which look rather ugly
to me.  Even worse, they've invented a very primitive type system which
would only be checked at run time.  This looks particularly bad since the
applications that we'd be running are very large parallel computations.  I
would like to make a try at writing an alternative based on Haskell, even
though there's probably little chance that I could get it adopted (since
no-one else here is familiar with functional programs, etc.).

However, there is one issue that I'd like to address.  I was looking at
http://donsbot.wordpress.com/2007/03/10/practical-haskell-shell-scripting-with-error-handling-and-privilege-separation/which
gave a very nice presentation of a domain specific language for shell
scripts.  One point that was made that commands were implemented as
functions, and privileged commands (i.e. those which needed root
privileges) were produced a result with a separate type, so that type
checking would give a compile time error if you didn't execute it via the
priv combinator.  But, the error messages given by ghc would be rather
incomprehensible to someone who wasn't familiar with Haskell (and maybe
even to someone who was!).  Has anyone looked into something that would
filter the error messages of put out by GHC and rewrite them into something
more domain specific?

Victor
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20120207/61b744c5/attachment.htm>


More information about the Haskell-Cafe mailing list