Haskell implementation of envdir- WIP