Rewrite git-fetch in haskell