Haskell for non-Haskell's sake

Tom Moertel tom@moertel.com
Fri, 05 Sep 2003 20:18:46 -0400


Hal Daume III wrote:
 > If you use Haskell for a purpose *other than* one of those
 > listed below, I'd love to hear.

Haskell is the implementation language behind PXSL, the Parsimonious XML 
Shorthand Language:

     PXSL ("pixel") is a convenient shorthand for writing markup-heavy
     XML documents. It provides XML authors and programmers with a
     simple, concise syntax that they can use to create XML
     documents. For more advanced users, PXSL offers customizable
     shortcuts and sophisticated refactoring tools like functional
     macros that can markedly reduce the size and complexity of
     markup-dense XML documents.

     http://community.moertel.com/ss/space/pxsl

PXSL also borrows Haskell's layout rule, which you can see in this
brief example comparing some MathML in XML and PXSL:

     MathML in XML                   MathML in PXSL

     <declare type="fn">             declare -type=fn
       <ci> f </ci>                    ci << f >>
       <lambda>                        lambda
         <bvar><ci> x </ci></bvar>       bvar
         <apply>                           ci << x >>
           <plus/>                       apply
           <apply>                         plus
             <power/>                      apply
             <ci> x </ci>                    power
             <cn> 2 </cn>                    ci << x >>
           </apply>                          cn << 2 >>
           <ci> x </ci>                    ci << x >>
           <cn> 3 </cn>                    cn << 3 >>
         </apply>
       </lambda>
     </declare>

I used Haskell to write PXSL because (a) I like Haskell, (b) it made 
writing the parser easy (thanks, Parsec!), (c) it made the macro system 
easy, and (d) did I mention that I like Haskell?

Cheers,
Tom