[Haskell-cafe] Haskell as a scripting language.

Chaddaï Fouché chaddai.fouche at gmail.com
Thu Sep 11 09:36:07 EDT 2008


2008/9/10 David F. Place <d at vidplace.com>:
> Hi, All.
>
> I needed to make a batch of edits to some input files after a big change
> in my program.  Normally, one would choose some scripting language, but
> I can't bear to program in them.   The nasty thing about using Haskell
> is that giving regexes as string constants sometime requires two levels
> of quoting.  For instance. (mkRegex "\\\\\\\\") matches \\.
>

Since some times in the HEAD and in the future 6.10 release, you can
use quasiquoting to get nice regex syntax as in Perl or Ruby.
http://hackage.haskell.org/cgi-bin/hackage-scripts/package/regexqq

(quasiquoting basically allows you to embed a DSL with significantly
different syntax in your Haskell and still get typechecking and other
advantages at compile-time (though I imagine the errors won't be very
nice).

-- 
Jedaï


More information about the Haskell-Cafe mailing list