[Haskell-cafe] Painting logs to get a coloured tree

Joachim Breitner mail at joachim-breitner.de
Tue Feb 10 03:55:29 EST 2009


Am Montag, den 09.02.2009, 16:41 -0700 schrieb Luke Palmer:
> 2009/2/9 Joachim Breitner <mail at joachim-breitner.de>
>         Now while this works, and while ST is still somewhat pure, I'm
>         wondering
>         if there is no better way of expressing "This piece of
>         information came
>         from the point in a data structure, so something else can be
>         put here
>         easily".
> You might want to look into zippers:
> http://haskell.org/haskellwiki/Zipper

I thought about Zippers, but I understand that they improve _navigating_
in a Tree-like structure, or to refrence _one_ position in a tree.

But if I would deconstruct my tree to the list of _all_ locations, with
> type Loc a = (Tree a, Cxt a)
and then run my algorithm that returns [(Loc a, Info)], it’s still not
clear to me how I can combine all of these locations to get back my
original Tree, annotated with the Info returned.

Thanks nevertheless,

Joachim "nomeata" Breitner
  mail: mail at joachim-breitner.de | ICQ# 74513189 | GPG-Key: 4743206C
  JID: nomeata at joachim-breitner.de | http://www.joachim-breitner.de/
  Debian Developer: nomeata at debian.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Dies ist ein digital signierter Nachrichtenteil
Url : http://www.haskell.org/pipermail/haskell-cafe/attachments/20090210/2d3d3c79/attachment.bin

More information about the Haskell-Cafe mailing list