Desugar: Refactor initDs
authorBen Gamari <bgamari.foss@gmail.com>
Tue, 7 Mar 2017 19:30:38 +0000 (14:30 -0500)
committerBen Gamari <ben@smart-cactus.org>
Tue, 7 Mar 2017 19:31:44 +0000 (14:31 -0500)
commit4bd2232754f2c0b365177d177e6d749c64e73176
tree69f1d8fec014619513843a3dc65f57c7192aaa5a
parent629799627f7b47c07ead984bad7f45f2a9c6d351
Desugar: Refactor initDs

As far as I can tell we were unnecessarily building a new TcgEnv when we
already had one on hand. TcRnMonad now sports an initTcWithGbl function,
which allows us to run a TcM monad in the context of this TcgEnv. This
appears to simplify things nicely.

Test Plan: Validate

Reviewers: austin

Subscribers: dfeuer, simonpj, thomie

Differential Revision: https://phabricator.haskell.org/D3228
compiler/deSugar/Desugar.hs
compiler/deSugar/DsMonad.hs
compiler/typecheck/TcRnMonad.hs
compiler/vectorise/Vectorise/Monad.hs