[Haskell-cafe] Bool as type class to serve EDSLs.

Sebastiaan Visser sfvisser at cs.uu.nl
Thu May 28 08:40:51 EDT 2009

Or overloading the `whitespace operator' for several kinds of  

On May 28, 2009, at 9:50 AM, Augustsson, Lennart wrote:
> And explicit desugaring of list syntax.
> -----Original Message-----
> From: Sittampalam, Ganesh [mailto:ganesh.sittampalam at credit- 
> suisse.com]
> Sent: 28 May 2009 08:46
> To: Simon Peyton-Jones; Sebastiaan Visser; Haskell Cafe
> Cc: Augustsson, Lennart
> Subject: RE: [Haskell-cafe] Bool as type class to serve EDSLs.
> There are multiple possible classes that you might want under  
> different
> circumstances (I think the most interesting issue is whether the class
> (==), (>) etc is in has a fundep from the type of the thing being
> compared to the type of the boolean), but if NoImplicitPrelude (or  
> some
> other extension) just desugars if-then-else into ifthenelse (with a
> default implementation of ifthenelse somewhere) I think that would be
> enough.
> Of course once you've got ifthenelse you find yourself wanting  
> explicit
> desugaring of pattern matching (could view patterns help here?),
> recursion (into an explicit use of fix), etc...
> Cheers,
> Ganesh
> Simon Peyton-Jones wrote:
>> You are absolutely right about the tantalising opportunity.
>> ...

More information about the Haskell-Cafe mailing list