Refcounting data structure in Haskell.