Solving the 8 queens problem in haskell