chemical equation balancer written in Haskell