[Haskell-beginners] Learning Haskell with the help of trees

Mateusz Kowalczyk fuuzetsu at fuuzetsu.co.uk
Wed May 14 16:32:31 UTC 2014


On 05/10/2014 02:05 PM, Michal Kawalec wrote:
> Hi,
> 
> I am beginning to learn Haskell, and I decided to try to implement a
> tree. Its code is available at
> https://gist.github.com/anonymous/dd3eaa8bc36025d7751c
> 
> I would need some help with implementing the delete element procedure. I
> have a feeling I am doing something very unhaskelly there. Also, when
> deleting a node having two children, how do I run two actions (swap the
> values and delete the successor)?
> 
> Also, I would be delighted if you could take a look on the style and
> similar aspects, as they are best addressed at the beginning.
> 
> 
> 
> Thanks,
> Michal
> 
> 
> 
> _______________________________________________
> Beginners mailing list
> Beginners at haskell.org
> http://www.haskell.org/mailman/listinfo/beginners
> 

I started a project which aims to implement paredit-like editing
functionality which effectively involves AST manipulation.

The final goal is to use it in Yi but that's far off and no Yi code
should be in the library itself.

There is very little code as I did not have much time for it, but
perhaps it something you might be interested in as practice. See [1]. It
basically involves implementing the functionality seen at [2] so that
editors in the future can bind keys to the functions and manipulate the
AST that way.

Let me know if you're interested in working on this.

[1]: https://github.com/Fuuzetsu/hs-paredit
[2]: http://mumble.net/~campbell/emacs/paredit.html

-- 
Mateusz K.


More information about the Beginners mailing list