Improving Astar haskell