redModule impDecls impEqs (Module m ns xs ds is bss)
                                = do (bss,_) <- redTopBinds env1 bss
                                     return (Module m ns xs ds is bss)
  where env0                    = addDecls initEnv (tdefsOf impDecls ++ tdefsOf ds)
        env1                    = addEqns env0 (finiteEqns env0 impEqs)
redModule impDecls impEqs (Module m ns xs ds is bss)
                                = do (bss,_) <- redTopBinds env1 bss
                                     return (Module m ns xs ds is bss)
  where env0                    = addDecls initEnv (tdefsOf impDecls ++ tdefsOf ds)
        env1                    = addEqns env0 (finiteEqns env0 impEqs)
redModule impDecls impEqs (Module m ns xs ds is bss)
                                = do (bss,_) <- redTopBinds env1 bss
                                     return (Module m ns xs ds is bss)
  where env0                    = addDecls initEnv (tdefsOf impDecls ++ tdefsOf ds)
        env1                    = addEqns env0 (finiteEqns env0 impEqs)