[Haskell-cafe] re-implementing gracefulClose in the network library