Haskell Implementation of a chess engine