<div dir="ltr"><div>I am a bit late to this discussion, but do recall using a the rosezipper in HaRe.</div><div><br></div><div>And I just took a look and recall doing some experiments with zippers, which are at</div><div><br></div><div><a href="https://github.com/alanz/HaRe/tree/98f390b6e9d48537429863ca890aa853afcd7c79/experiments">https://github.com/alanz/HaRe/tree/98f390b6e9d48537429863ca890aa853afcd7c79/experiments</a></div><div><br></div><div>The actual code I used for the move definition refactoring is at <br></div><div><a href="https://github.com/alanz/HaRe/blob/98f390b6e9d48537429863ca890aa853afcd7c79/src/Language/Haskell/Refact/Refactoring/MoveDef.hs#L355">https://github.com/alanz/HaRe/blob/98f390b6e9d48537429863ca890aa853afcd7c79/src/Language/Haskell/Refact/Refactoring/MoveDef.hs#L355</a></div><div>I added a couple of helper functions too.</div><div><br></div><div>I am sure it is all horrible code, I was learning at the time, and it sort of blew my mind.</div><div><br></div><div>Alan<br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, 22 Jul 2020 at 21:11, Olaf Klinke <<a href="mailto:olf@aatal-apotheke.de">olf@aatal-apotheke.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">> A direct implementation without using a library is interesting, thank<br>
> you. I<br>
> refrained from doing that, because I thought that Control.Zipper<br>
> would actually<br>
> do this for me. Actually, I was pretty successful with using<br>
> Control.Zipper to<br>
> change node labels, but failed doing more complicated stuff.<br>
> <br>
Isn't that a strong indicator that zippers are an improper abstraction<br>
for your purpose? Perhaps after rolling your own implementation you can<br>
more easily discover how to represent the algrorithm as a zipper. <br>
<br>
Olaf<br>
<br>
_______________________________________________<br>
Haskell-Cafe mailing list<br>
To (un)subscribe, modify options or view archives go to:<br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe</a><br>
Only members subscribed via the mailman list are allowed to post.</blockquote></div>