A pure Haskell implementation of Datalog