[Haskell-cafe] ANNOUNCE: pretty-tree
For a project I'm working on, I got sick of writing out trees by hand. Data.Tree has a drawTree function, but whilst it's better than nothing, I prefer a more top-down traditional approach to drawing trees. So I wrote a package to do just that: http://hackage.haskell.org/package/pretty-tree (I didn't think to check whether diagrams had capabilities to do so until after I finished, though in this case I prefer a textual approach anyway.) I'm more than happy to consider adding other forms of drawing trees (though off-hand I can't think of any), or of course you can send me patches since I'm taking advantage of the nice new shiny hub.darcs.net (thanks Darcs team!). I was going to put an example here but it only really comes out nicely if you're using a monospaced font, so have a look at the Haddock docs for the module once Hackage builds it (in hindsight, I should probably have come up with better labels before releasing the package... oh well :) -- Ivan Lazar Miljenovic ivan.miljeno...@gmail.com http://IvanMiljenovic.wordpress.com ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] ANNOUNCE: pretty-tree
The idea is pretty good, although I suggest you make clickable the Haddock's link to modules, because I had to navigate the source in order to find some application as well as nice tree visualizations :) Cheers, A. On 26 October 2012 14:58, Ivan Lazar Miljenovic ivan.miljeno...@gmail.comwrote: For a project I'm working on, I got sick of writing out trees by hand. Data.Tree has a drawTree function, but whilst it's better than nothing, I prefer a more top-down traditional approach to drawing trees. So I wrote a package to do just that: http://hackage.haskell.org/package/pretty-tree (I didn't think to check whether diagrams had capabilities to do so until after I finished, though in this case I prefer a textual approach anyway.) I'm more than happy to consider adding other forms of drawing trees (though off-hand I can't think of any), or of course you can send me patches since I'm taking advantage of the nice new shiny hub.darcs.net (thanks Darcs team!). I was going to put an example here but it only really comes out nicely if you're using a monospaced font, so have a look at the Haddock docs for the module once Hackage builds it (in hindsight, I should probably have come up with better labels before releasing the package... oh well :) -- Ivan Lazar Miljenovic ivan.miljeno...@gmail.com http://IvanMiljenovic.wordpress.com ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] ANNOUNCE: pretty-tree
Which links _aren't_ clickable? If you mean the one to diagrams-contrib, since it isn't imported I can't link to that module directly. One thing I just realised: compared to drawTrees, drawVerticalTree reverses the direction of sub-trees (in that it isn't just equivalent to rotating it clockwise 90 degrees); I'll rectify this when I get to my computer later. On Oct 27, 2012 12:06 AM, Alfredo Di Napoli alfredo.dinap...@gmail.com wrote: The idea is pretty good, although I suggest you make clickable the Haddock's link to modules, because I had to navigate the source in order to find some application as well as nice tree visualizations :) Cheers, A. On 26 October 2012 14:58, Ivan Lazar Miljenovic ivan.miljeno...@gmail.com wrote: For a project I'm working on, I got sick of writing out trees by hand. Data.Tree has a drawTree function, but whilst it's better than nothing, I prefer a more top-down traditional approach to drawing trees. So I wrote a package to do just that: http://hackage.haskell.org/package/pretty-tree (I didn't think to check whether diagrams had capabilities to do so until after I finished, though in this case I prefer a textual approach anyway.) I'm more than happy to consider adding other forms of drawing trees (though off-hand I can't think of any), or of course you can send me patches since I'm taking advantage of the nice new shiny hub.darcs.net (thanks Darcs team!). I was going to put an example here but it only really comes out nicely if you're using a monospaced font, so have a look at the Haddock docs for the module once Hackage builds it (in hindsight, I should probably have come up with better labels before releasing the package... oh well :) -- Ivan Lazar Miljenovic ivan.miljeno...@gmail.com http://IvanMiljenovic.wordpress.com ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] ANNOUNCE: pretty-tree
I think Alfredo meant the link to module's haddock which had not been generated when you sent out the announcement. Roman * Ivan Lazar Miljenovic ivan.miljeno...@gmail.com [2012-10-27 07:37:10+1100] Which links _aren't_ clickable? If you mean the one to diagrams-contrib, since it isn't imported I can't link to that module directly. One thing I just realised: compared to drawTrees, drawVerticalTree reverses the direction of sub-trees (in that it isn't just equivalent to rotating it clockwise 90 degrees); I'll rectify this when I get to my computer later. On Oct 27, 2012 12:06 AM, Alfredo Di Napoli alfredo.dinap...@gmail.com wrote: The idea is pretty good, although I suggest you make clickable the Haddock's link to modules, because I had to navigate the source in order to find some application as well as nice tree visualizations :) Cheers, A. On 26 October 2012 14:58, Ivan Lazar Miljenovic ivan.miljeno...@gmail.com wrote: For a project I'm working on, I got sick of writing out trees by hand. Data.Tree has a drawTree function, but whilst it's better than nothing, I prefer a more top-down traditional approach to drawing trees. So I wrote a package to do just that: http://hackage.haskell.org/package/pretty-tree (I didn't think to check whether diagrams had capabilities to do so until after I finished, though in this case I prefer a textual approach anyway.) I'm more than happy to consider adding other forms of drawing trees (though off-hand I can't think of any), or of course you can send me patches since I'm taking advantage of the nice new shiny hub.darcs.net (thanks Darcs team!). I was going to put an example here but it only really comes out nicely if you're using a monospaced font, so have a look at the Haddock docs for the module once Hackage builds it (in hindsight, I should probably have come up with better labels before releasing the package... oh well :) -- Ivan Lazar Miljenovic ivan.miljeno...@gmail.com http://IvanMiljenovic.wordpress.com ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] ANNOUNCE: pretty-tree
Iavor's pretty-show package is quite handy for these kind of tasks as well. Highly recommended: http://hackage.haskell.org/package/pretty-show Since Iavor package is not tree-centric, it'll probably not generate as nice output as you can for real tree-like-data. However, since it works on arbitrary Show instances, it's much more readily usable: It's (almost) a drop-in replacement for show. I find it to be extremely valuable in debugging tasks. -Levent. On Fri, Oct 26, 2012 at 5:58 AM, Ivan Lazar Miljenovic ivan.miljeno...@gmail.com wrote: For a project I'm working on, I got sick of writing out trees by hand. Data.Tree has a drawTree function, but whilst it's better than nothing, I prefer a more top-down traditional approach to drawing trees. So I wrote a package to do just that: http://hackage.haskell.org/package/pretty-tree (I didn't think to check whether diagrams had capabilities to do so until after I finished, though in this case I prefer a textual approach anyway.) I'm more than happy to consider adding other forms of drawing trees (though off-hand I can't think of any), or of course you can send me patches since I'm taking advantage of the nice new shiny hub.darcs.net (thanks Darcs team!). I was going to put an example here but it only really comes out nicely if you're using a monospaced font, so have a look at the Haddock docs for the module once Hackage builds it (in hindsight, I should probably have come up with better labels before releasing the package... oh well :) -- Ivan Lazar Miljenovic ivan.miljeno...@gmail.com http://IvanMiljenovic.wordpress.com ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe