[Haskell-cafe] An easy way to represent and modify graphs?
Strake
strake888 at gmail.com
Fri Sep 28 06:32:30 CEST 2012
On 21/09/2012, Takayuki Muranushi <muranushi at gmail.com> wrote:
> Yes Pointers. I've forgotten that. I have once dealt with structures,
> with lots of IORefs. It was smooth and fast. Thank you for reminding
> me!
>
> On the other hand, use of pointers means that our values are not
> algebraic data type any more. We have to derive operations such as
> map, fold, serialize by ourselves. I can do that, but am I right? Or
> is there some systematic way to derive such operations?
If you mean that one can't write "deriving (Class, ...)" then yes, to
my knowledge, one can't, as it would not know to follow the pointers.
I doubt that such a derivation algorithm would be possible in general,
since it wouldn't know whether to compare by value, i.e. follow the
pointer.
> Best regards,
>
> Takayuki
>
Cheers,
Strake
More information about the Haskell-Cafe
mailing list