[Haskell-cafe] Design of a DSL in Haskell
Kim-Ee Yeoh
ky3 at atamo.com
Wed Dec 5 02:34:28 CET 2012
Little things to check understanding:
* ghc/ghci implements a DSL called Haskell -- does it do so in a deep or
shallow way?
* where are the shallow DSLs? the deep ones? (hint: some of them are right
under our very noses!)
-- Kim-Ee
On Wed, Dec 5, 2012 at 12:49 AM, Stephen Tetley <stephen.tetley at gmail.com>wrote:
> In Haskell, shallow DSLs generate values - deep DSLs generate
> structures (typically abstract syntax trees), the structure can
> subsequently be used to generate a value (or a C program, or a HTML
> page, etc.).
>
> See Andy Gill and colleagues "Types and Type Families for Hardware
> Simulation and Synthesis, The Internals and Externals of Kansas Lava"
> for a fuller definition.
>
>
> http://www.ittc.ku.edu/csdl/fpg/sites/default/files/Gill-10-TypesKansasLava.pdf
>
> Other communities may have their own definitions.
>
> On 4 December 2012 10:01, Kim-Ee Yeoh <ky3 at atamo.com> wrote:
> > On Tue, Dec 4, 2012 at 4:53 PM, Joerg Fritsch <fritsch at joerg.cc> wrote:
> >> is a shallow embedded DSL == an internal DSL and a deeply embedded DSL
> ==
> >> an external DSL or the other way around?
> >
> > Roughly speaking, yes. But a deep DSL doesn't mean you've got to have a
> > parser << tokenizer << IO input. You can get a deep DSL merely from the
> free
> > monad construction.
> >
> > -- Kim-Ee
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20121205/7f8e4b23/attachment.htm>
More information about the Haskell-Cafe
mailing list