Which reminds me of a (partial) Haskell git implementation: http://stefan.saasen.me/articles/git-clone-in-haskell-from-t...
Previously posted to HN a number times, e.g. https://news.ycombinator.com/item?id=8713328
Btw, rewriting darcs would really feel like reinventing the wheel. Haskell is safe and great already.