[Haskell-cafe] DSL

46 views
Skip to first unread message

Закиров Марат

unread,
Mar 27, 2015, 3:04:36 AM3/27/15
to Haskell Cafe mailing list
Hi folks!

Are there any examples of Domain Specific Language (DSL) on Haskell? Thank you in advance.

--
Regards, Marat.
С уважением Марат.

Tikhon Jelvis

unread,
Mar 27, 2015, 3:14:48 AM3/27/15
to Закиров Марат, Haskell Cafe mailing list
Galois has released a few well-documented examples including Ivory[1], a language for safer systems programming and Cryptol[2], a language for specifying cryptographic algorithms.

A couple of other low-level examples are Copilot[3] and Atom[4], both of which generate C for embedded programming but with somewhat different characteristics and aims.

On a slightly different note, we have SBV[5] (SMT-based verification) which presents a high-level programming model for using multiple SMT solvers including the recently open-sourced Z3.

All of these follow a pretty similar pattern in terms of letting you specify logic and generate code for it. A different sort of DSL can be found in various combinator libraries like Parsec[6] (for parsing) and the Wadler/Leijin Pretty Printer[7] for, well, pretty printing (ie the inverse of parsing).

[1]: http://ivorylang.org/ivory-introduction.html
[2]: https://galois.com/project/cryptol/
[3]: https://hackage.haskell.org/package/copilot
[4]: https://hackage.haskell.org/package/atom
[5]: https://hackage.haskell.org/package/sbv
[6]: https://wiki.haskell.org/Parsec
[7]: https://hackage.haskell.org/package/wl-pprint-1.0/docs/Text-PrettyPrint-Leijen.html

_______________________________________________
Haskell-Cafe mailing list
Haskel...@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe


Yuji Yamamoto

unread,
Mar 27, 2015, 10:31:04 AM3/27/15
to Закиров Марат, Haskell Cafe mailing list
Check out relational-record.
You can write type-checked SQLs in Haskell with it.

_______________________________________________
Haskell-Cafe mailing list
Haskel...@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe

Michal Antkiewicz

unread,
Mar 27, 2015, 3:30:16 PM3/27/15
to Закиров Марат, Haskell Cafe mailing list
Hi,

A very nice example is Lucid for generating HTML:

https://github.com/chrisdone/lucid

It's noteworthy how Chris nicely handles optionality of attributes.
Michal


Sergey Vinokurov

unread,
Mar 28, 2015, 9:00:15 AM3/28/15
to Закиров Марат, Haskell Cafe mailing list
Hi,

You may find out FPF, the DSL for describing exotic financial
contracts, interesting.

There's somewhat detailed paper http://arbitrary.name/papers/fpf.pdf.

Also there're less detailed slides
http://www.timphilipwilliams.com/slides/HaskellAtBarclays.pdf which
have more general info on EDSLs in Haskell.

Reply all
Reply to author
Forward
0 new messages