[Haskell-cafe] Haskell as embedded DSL

Emil Axelsson emax at cs.chalmers.se
Wed Jul 5 13:50:06 EDT 2006

Joel Reymont skrev:
> On Jul 5, 2006, at 3:07 PM, Niklas Broberg wrote:
>> Lava: http://www.cs.chalmers.se/~koen/Lava/
> Excellent example, thank you Niklas!
> Are you using QuickCheck for verification?

I assume you're asking if Lava (rather than Niklas) uses QuickCheck.

In Lava, you write properties in a style similar to QuickCheck props., but the 
actual verification is done by external tools. You still get the nice benefit of 
having description and verification within the same language.

About teaching Lava (and probably other Haskell DSLs) to non Haskellers, I think 
that higher-order functions (and the type errors you get when using them 
incorrectly) is what causes most confusion among our students. A minority of 
them also finds it hard to use recursion instead of loops. Luckily, they don't 
have to use monads...

I've been talking to a person at Intel who has been trying to teach their 
hardware designers to use a functional language (somewhat like Lava). This 
turned out to be much harder than expected, since the designers were so used to 
the imperative style. I'm not sure what the current status is, but they really 
have to make a trade-off between the time it takes to "convert" the designers 
and the quality (correctness/maintainability/performance/coding time/etc.) of 
the resulting code. It is important to show that functional programming has an 
advantage on the latter aspect (if that is the case).

/ Emil

More information about the Haskell-Cafe mailing list