Haskell implementation of Knights tour