A* Algorithm implemented in Haskell