text: // Generated by psc version 0.9.1
  "use strict";
  var Prelude = require("../Prelude");
  var Control_Monad_Cont_Class = require("../Control.Monad.Cont.Class");
  var Control_Monad_Eff_Class = require("../Control.Monad.Eff.Class");
  var Control_Monad_Reader_Class = require("../Control.Monad.Reader.Class");
  var Control_Monad_State_Class = require("../Control.Monad.State.Class");
  var Control_Monad_Trans = require("../Control.Monad.Trans");
  var Data_Functor = require("../Data.Functor");
  var Data_Function = require("../Data.Function");
  var Control_Apply = require("../Control.Apply");
  var Control_Applicative = require("../Control.Applicative");
  var Control_Bind = require("../Control.Bind");
  var Control_Monad = require("../Control.Monad");
  var Control_Semigroupoid = require("../Control.Semigroupoid");
  var ContT = function (x) {
      return x;
  };
  var withContT = function (f) {
      return function (v) {
          return function (k) {
              return v(f(k));
          };
      };
  };
  var runContT = function (v) {
      return function (k) {
          return v(k);
      };
  };
  var monadTransContT = new Control_Monad_Trans.MonadTrans(function (dictMonad) {
      return function (m) {
          return function (k) {
              return Control_Bind.bind(dictMonad["__superclass_Control.Bind.Bind_1"]())(m)(k);
          };
      };
  });
  var mapContT = function (f) {
      return function (v) {
          return function (k) {
              return f(v(k));
          };
      };
  };
  var functorContT = function (dictFunctor) {
      return new Data_Functor.Functor(function (f) {
          return function (v) {
              return function (k) {
                  return v(function (a) {
                      return Data_Function.apply(k)(f(a));
                  });
              };
          };
      });
  };
  var applyContT = function (dictApply) {
      return new Control_Apply.Apply(function () {
          return functorContT(dictApply["__superclass_Data.Functor.Functor_0"]());
      }, function (v) {
          return function (v1) {
              return function (k) {
                  return v(function (g) {
                      return v1(function (a) {
                          return k(g(a));
                      });
                  });
              };
          };
      });
  };
  var bindContT = function (dictBind) {
      return new Control_Bind.Bind(function () {
          return applyContT(dictBind["__superclass_Control.Apply.Apply_0"]());
      }, function (v) {
          return function (k) {
              return function (k$prime) {
                  return v(function (a) {
                      var $32 = k(a);
                      return $32(k$prime);
                  });
              };
          };
      });
  };
  var applicativeContT = function (dictApplicative) {
      return new Control_Applicative.Applicative(function () {
          return applyContT(dictApplicative["__superclass_Control.Apply.Apply_0"]());
      }, function (a) {
          return function (k) {
              return k(a);
          };
      });
  };
  var monadContT = function (dictMonad) {
      return new Control_Monad.Monad(function () {
          return applicativeContT(dictMonad["__superclass_Control.Applicative.Applicative_0"]());
      }, function () {
          return bindContT(dictMonad["__superclass_Control.Bind.Bind_1"]());
      });
  };
  var monadContContT = function (dictMonad) {
      return new Control_Monad_Cont_Class.MonadCont(function () {
          return monadContT(dictMonad);
      }, function (f) {
          return function (k) {
              var $34 = f(function (a) {
                  return function (v) {
                      return k(a);
                  };
              });
              return $34(k);
          };
      });
  };
  var monadEffContT = function (dictMonadEff) {
      return new Control_Monad_Eff_Class.MonadEff(function () {
          return monadContT(dictMonadEff["__superclass_Control.Monad.Monad_0"]());
      }, function ($38) {
          return Control_Monad_Trans.lift(monadTransContT)(dictMonadEff["__superclass_Control.Monad.Monad_0"]())(Control_Monad_Eff_Class.liftEff(dictMonadEff)($38));
      });
  };
  var monadReaderContT = function (dictMonadReader) {
      return new Control_Monad_Reader_Class.MonadReader(function () {
          return monadContT(dictMonadReader["__superclass_Control.Monad.Monad_0"]());
      }, Control_Monad_Trans.lift(monadTransContT)(dictMonadReader["__superclass_Control.Monad.Monad_0"]())(Control_Monad_Reader_Class.ask(dictMonadReader)), function (f) {
          return function (v) {
              return function (k) {
                  return Control_Bind.bind((dictMonadReader["__superclass_Control.Monad.Monad_0"]())["__superclass_Control.Bind.Bind_1"]())(Control_Monad_Reader_Class.ask(dictMonadReader))(function (v1) {
                      return Control_Monad_Reader_Class.local(dictMonadReader)(f)(v(function ($39) {
                          return Control_Monad_Reader_Class.local(dictMonadReader)(Data_Function["const"](v1))(k($39));
                      }));
                  });
              };
          };
      });
  };
  var monadStateContT = function (dictMonadState) {
      return new Control_Monad_State_Class.MonadState(function () {
          return monadContT(dictMonadState["__superclass_Control.Monad.Monad_0"]());
      }, function ($40) {
          return Control_Monad_Trans.lift(monadTransContT)(dictMonadState["__superclass_Control.Monad.Monad_0"]())(Control_Monad_State_Class.state(dictMonadState)($40));
      });
  };
  module.exports = {
      ContT: ContT, 
      mapContT: mapContT, 
      runContT: runContT, 
      withContT: withContT, 
      monadContContT: monadContContT, 
      functorContT: functorContT, 
      applyContT: applyContT, 
      applicativeContT: applicativeContT, 
      bindContT: bindContT, 
      monadContT: monadContT, 
      monadTransContT: monadTransContT, 
      monadEffContT: monadEffContT, 
      monadReaderContT: monadReaderContT, 
      monadStateContT: monadStateContT
  };
  