The lazy evaluation mechanism included by the Haskell Language and the State Monad are used to build a modular plugin based compiler for a DSL called Simple. This is helping programmers to avoid the backpatching procedure, so producing a clear, modular simplified, monadic code generator.