Physics engine for Haskell