Graph database in Haskell