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&#39;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">&lt;<a href="mailto:steffen.siering@googlemail.com">steffen.siering@googlemail.com</a>&gt;</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 &lt;<a href="mailto:corentin.dup...@gmail.com">corentin.dup...@gmail.com</a>&gt; wrote:<br>
&gt; Thank you for your rich responses.<br>
&gt;<br>
&gt; Indeed I think I miss some thinks in my DSL, that would make things easier<br>
&gt; to deal with lists and first class functions.<br>
&gt; I don&#39;t really know what for now.<br>
&gt; Perhaps a List Constructor? Or a constructor on functions like yours Ryan?<br>
&gt; EAp :: Exp ref (a -&gt; b) -&gt; Exp ref a -&gt; Exp ref b<br>
&gt; It&#39;s from which DSL? It is accessible on the net?<br>
&gt;<br>
&gt; Chris suggested me that I can only define the Foldr constructor and deduce<br>
&gt; Map from it.<br>
&gt; But maybe I have to add a List constructor for that.<br>
&gt;<br>
&gt; But in the suggestions from Ryan and Brandon I don&#39;t understand why I should<br>
&gt; add an extra type parameter and what it is!<br>
&gt;<br>
&gt; Steffen: Wow nice. I&#39;ll integrate that ;)<br>
&gt;<br>
&gt; I&#39;m also looking at the Atom&#39;s DSL to get inspiration.<br>
&gt; Something I don&#39;t understand in it is that it has two languages, on typed:<br>
&gt;<br>
&gt; data E a where<br>
&gt;   VRef    :: V a -&gt; E a<br>
&gt;   Const   :: a -&gt; E a<br>
&gt;   Cast    :: (NumE a, NumE b) =&gt; E a -&gt; E b<br>
&gt;   Add     :: NumE a =&gt; E a -&gt; E a -&gt; E a<br>
&gt; etc.<br>
&gt;<br>
&gt; And, along with it, an untyped counterpart:<br>
&gt;<br>
&gt; -- | An untyped term.<br>
&gt; data UE<br>
&gt;   = UVRef UV<br>
&gt;   | UConst Const<br>
&gt;   | UCast  Type UE<br>
&gt;   | UAdd   UE UE<br>
&gt; etc.<br>
&gt;<br>
&gt; What that for? What&#39;s the use of having beautiful GADT if you have to<br>
&gt; maintain an untyped ADT aside??<br>
&gt;<br>
&gt; Corentin<br>
&gt;<br>
</div></div><div><div></div><div class="h5">&gt; _______________________________________________<br>
&gt; Haskell-Cafe mailing list<br>
&gt; 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>