basic version control implementation in Haskell