[Haskell-cafe] Finalisers

Andrew Coppin andrewcoppin at btinternet.com
Wed Nov 26 16:59:56 EST 2008

Here's an interesting question... Is it possible to attach finalisers to 
a value? (That is, have some Haskell code executed when the item in 
question is reclaimed by the GC.) I'm interested in knowing whether a 
particular data structure is shared (i.e., whether it's safe to mutate 
it or whether it must be copied first), and a simple reference-counting 
scheme looks like the easiest option.

More information about the Haskell-Cafe mailing list