Hello,<br>Very interresting.<br>Visual Haskell seems to be very close to the thing i imagined.<br>Mihai what do you think?<br>Unfortunatly i cannot find it on the web!<br>There is something for MS Visual Studio but i don&#39;t think this is the same...<br>
<br>Corentin<br><br><br><br><div class="gmail_quote">On Thu, Mar 25, 2010 at 12:07 AM, Miguel Vilaca <span dir="ltr">&lt;<a href="mailto:jmvilaca@di.uminho.pt">jmvilaca@di.uminho.pt</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div></div><div class="h5"><div style=""><div><div><div style="">Hi all,<div><br></div><div>Concerning INblobs, it&#39;s again online; a fire damaged the cable that links the university to the world!!</div><div>I don&#39;t update the tool for a long time... but I&#39;ll take a look on that.</div>
<div><br></div><div>Concerning visual functional programming, see this small chapter of my thesis about some of the existing languages.</div><div></div></div></div></div></div></div></div><br><div style=""><div><div><div style="">
<div></div><div><br></div><div>There are more subtleties on the visual side than those expected!!</div><div><br></div><div>If you also consider debugging tools, take a look on Ghood <a href="http://hackage.haskell.org/package/GHood" target="_blank">http://hackage.haskell.org/package/GHood</a></div>
<div><br></div><div>best regards</div><div>Miguel Vilaça</div><div><br><div><div>A 2010/03/23, às 05:31, Ronald Guida escreveu:</div><br><blockquote type="cite"><div>On Mon, Mar 22, 2010 at 7:02 PM, Dupont Corentin<br>&lt;<a href="mailto:corentin.dupont@gmail.com" target="_blank">corentin.dupont@gmail.com</a>&gt; wrote:<br>
<blockquote type="cite">Hello, I’m relatively new to Haskell.<br></blockquote><blockquote type="cite">I’m wondering if it exist a tool to graphically represent Haskell code.<br></blockquote>...<br><blockquote type="cite">
Let’s try to do it on a simple example, as an exercise:<br></blockquote><blockquote type="cite">f = Map (+1)<br></blockquote><br>Your graphic for &quot;f = map (+1)&quot; seems much more complex than the<br>corresponding code.  I would agree with Ivan Miljenovic:<br>
<blockquote type="cite">I&#39;m of the opinion that unless you just use it on small snippets,<br></blockquote><blockquote type="cite">the generated images will be too large and unwieldy.<br></blockquote><br>The first question I would ask is /why/ would you like to visualize<br>
some Haskell code?  If you want to see the high-level structure of<br>a complex program, try SourceGraph. (I have never used it though.)<br><br>On the other hand, if you are trying to visualize Haskell as part of<br>your efforts to learn the language, then I believe it would be best to<br>
draw diagrams by hand, rather than relying on an automated tool.<br>The kinds of things that you&#39;ll want to depict are probably going to<br>vary considerably, depending on what you&#39;re trying to understand.<br><br>
Consider a few different implementations of the &quot;map&quot; function:<br><br>  -- version 1: recursion<br>  map1 :: (a -&gt; b) -&gt; [a] -&gt; [b]<br>  map1 f [] = []<br>  map1 f (x:xs) = (f x) : map1 f xs<br><br>  -- version 2: fold<br>
  map2 :: (a -&gt; b) -&gt; [a] -&gt; [b]<br>  map2 f = foldr ((:) . f) []<br><br>  -- version 3: continuation passing style<br>  map3 :: (a -&gt; b) -&gt; [a] -&gt; [b]<br>  map3 f xs = map&#39; (\x y -&gt; f x : y) xs<br>
    where<br>      map&#39; k [] = []<br>      map&#39; k (y:ys) = k y  (map&#39; k ys)<br><br>  -- version 4: list comprehension<br>  map4 :: (a -&gt; b) -&gt; [a] -&gt; [b]<br>  map4 f xs = [f x | x &lt;- xs]<br><br>  -- version 5: list monad<br>
  map5 :: (a -&gt; b) -&gt; [a] -&gt; [b]<br>  map5 f xs = xs &gt;&gt;= (return . f)<br><br>These all do exactly the same thing, but each one uses different<br>techniques.  If I&#39;m trying to learn (or teach) Haskell, I would<br>
probably need a slightly different visual &quot;language&quot; for each one<br>in order to capture the most relevant concepts in a useful way.<br>How would you visualize them?<br><br>@Mihai Maruseac:<br>I think a visual debugger would be a wonderful idea.  You may want<br>
to consider how a visual debugger would work with each of these<br>versions of map.<br><br>:-) You might also consider several versions of factorial :-)<br><a href="http://www.willamette.edu/%7Efruehr/haskell/evolution.html" target="_blank">http://www.willamette.edu/~fruehr/haskell/evolution.html</a><br>
<br>-- Ron<br>_______________________________________________<br>Haskell-Cafe mailing list<br><a href="mailto:Haskell-Cafe@haskell.org" target="_blank">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></blockquote></div><br></div></div></div></div><br></div><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>
<br></blockquote></div><br>