A Haskell implementation of the Levenberg-Marquardt algorithm