Symplectic methods in Haskell