Haskell based implementation of VF2 algorithm