[Haskell-beginners] Haskell code as DSL

Mateusz Kowalczyk fuuzetsu at fuuzetsu.co.uk
Thu Mar 20 20:17:05 UTC 2014


On 20/03/14 19:50, Rosario Borda wrote:
> Hello Haskellers,
> what about insert haskell code as DSL in haskell program? as an example, in
> ghci:
> 
>> eval [haskell| tail [0,1,2,3]|]
>  [1,2,3]
> 
> as intermediate step to get an interactive word-based italian translation
> of haskell:
> 
>> eval [italian| coda [0,1,2,3]|]
>  [1,2,3]
> 
> I'm an italian primary school teacher and I would like to introduce
> my schoolchildren to FP using haskell...
> 
> Thank you very much, see You son.
> Rosario
> 
> 
> 
> _______________________________________________
> Beginners mailing list
> Beginners at haskell.org
> http://www.haskell.org/mailman/listinfo/beginners
> 

What's wrong with making something like Prelude.Italian which re-exports
the common functions under their Italian equivalents?

It'd just contain things like

coda = tail
…

Isn't this much easier than messing with Template Haskell and
effectively achieving the same thing? Maybe there's something I'm
missing here.

-- 
Mateusz K.


More information about the Beginners mailing list