This is really cool. <br>The blog post [3] finally explained to me why I had so much difficulties implementing the Equal constructor ;)<br>I shared this in a previous thread:<br><a href="http://osdir.com/ml/haskell-cafe@haskell.org/2010-06/msg00369.html">http://osdir.com/ml/haskell-cafe@haskell.org/2010-06/msg00369.html</a><br>
<br>Maybe latter I'll shift to a class type based DSL. They seem more generic than data type based.<br><br>Corentin<br><br><div class="gmail_quote">On Thu, Oct 28, 2010 at 2:02 PM, steffen <span dir="ltr"><<a href="mailto:steffen.siering@googlemail.com">steffen.siering@googlemail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">I think you would love to have a look at AwesomePrelude[1] or a fork<br>
of AwesomePrelude using associated types[2]<br>
Some more background information by Tom Lokhorst [3][4].<br>
<br>
[1] <a href="http://github.com/tomlokhorst/AwesomePrelude" target="_blank">http://github.com/tomlokhorst/AwesomePrelude</a><br>
[2] <a href="http://github.com/urso/AwesomePrelude" target="_blank">http://github.com/urso/AwesomePrelude</a><br>
[3] <a href="http://tom.lokhorst.eu/2009/09/deeply-embedded-dsls" target="_blank">http://tom.lokhorst.eu/2009/09/deeply-embedded-dsls</a><br>
[4] <a href="http://tom.lokhorst.eu/2010/02/awesomeprelude-presentation-video" target="_blank">http://tom.lokhorst.eu/2010/02/awesomeprelude-presentation-video</a><br>
<div><div></div><div class="h5"><br>
On 28 Okt., 12:09, Dupont Corentin <<a href="mailto:corentin.dup...@gmail.com">corentin.dup...@gmail.com</a>> wrote:<br>
> Thank you for your rich responses.<br>
><br>
> Indeed I think I miss some thinks in my DSL, that would make things easier<br>
> to deal with lists and first class functions.<br>
> I don't really know what for now.<br>
> Perhaps a List Constructor? Or a constructor on functions like yours Ryan?<br>
> EAp :: Exp ref (a -> b) -> Exp ref a -> Exp ref b<br>
> It's from which DSL? It is accessible on the net?<br>
><br>
> Chris suggested me that I can only define the Foldr constructor and deduce<br>
> Map from it.<br>
> But maybe I have to add a List constructor for that.<br>
><br>
> But in the suggestions from Ryan and Brandon I don't understand why I should<br>
> add an extra type parameter and what it is!<br>
><br>
> Steffen: Wow nice. I'll integrate that ;)<br>
><br>
> I'm also looking at the Atom's DSL to get inspiration.<br>
> Something I don't understand in it is that it has two languages, on typed:<br>
><br>
> data E a where<br>
> VRef :: V a -> E a<br>
> Const :: a -> E a<br>
> Cast :: (NumE a, NumE b) => E a -> E b<br>
> Add :: NumE a => E a -> E a -> E a<br>
> etc.<br>
><br>
> And, along with it, an untyped counterpart:<br>
><br>
> -- | An untyped term.<br>
> data UE<br>
> = UVRef UV<br>
> | UConst Const<br>
> | UCast Type UE<br>
> | UAdd UE UE<br>
> etc.<br>
><br>
> What that for? What's the use of having beautiful GADT if you have to<br>
> maintain an untyped ADT aside??<br>
><br>
> Corentin<br>
><br>
</div></div><div><div></div><div class="h5">> _______________________________________________<br>
> Haskell-Cafe mailing list<br>
> Haskell-C...@haskell.orghttp://<a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
</div></div></blockquote></div><br>