Haskell module to solve for the roots of a function