by Marcus Walz mewalz at uwm edu
This is my expiremental "pet project" which is a wrapper for git in Haskell. Currently, it is a prototype and works simply by calling the git command and parsing the output.
Parsec/Enumeraters/Monadic composition would simplify this code a lot.
There are dozens of packages on hackage that do the same thing, I suggest you try those first.
The orginal code was inspired by vincenthz's libgit
There are also low level LibGit2 bindings available.
After HGit is installed. This example clones a git repository and grabs each commit.
$ mkdir dir
$ ghci
> :m +Lib.HGit Data.Text.Lazy
> let c = makeGitConfig "dir/" Nothing
> let url = pack "https://github.com/MarcusWalz/hgit.git"
> runGit c $ gitClone url
> revs <- runGit c $ revList
> commits <- runGit c $ catObjects revs
> commits