Solving a sliding puzzle using Haskell.