Implementations of some commands (e.g. printenv) in Haskell