Haskell library for encapsulating system resources as nested processes