Implementation of search algorithm using Haskell, and visual representation using Gloss library