Revert "Use a state monad to track environment."
Revert "Use a state monad to track environment."

This reverts commit 8fbfbce8011423361e29054ac399ee9fc6b99442.

5outh/Elm,JoeyEremondi/elm-pattern-effects,laszlopandy/elm-compiler,deadfoxygrandpa/Elm,Axure/elm-compiler,mgold/Elm,pairyo/elm-compiler