// Generated by purs version 0.14.5
"use strict";
var Control_Comonad = require("../Control.Comonad/index.js");
var Control_Comonad_Traced_Trans = require("../Control.Comonad.Traced.Trans/index.js");
var Data_Functor = require("../Data.Functor/index.js");
var Data_Tuple = require("../Data.Tuple/index.js");
var track = function (dict) {
    return dict.track;
};
var tracks = function (dictComonadTraced) {
    return function (f) {
        return function (w) {
            return track(dictComonadTraced)(f(Control_Comonad.extract(dictComonadTraced.Comonad0())(w)))(w);
        };
    };
};
var listens = function (dictFunctor) {
    return function (f) {
        return function (v) {
            return Data_Functor.map(dictFunctor)(function (g) {
                return function (t) {
                    return new Data_Tuple.Tuple(g(t), f(t));
                };
            })(v);
        };
    };
};
var listen = function (dictFunctor) {
    return function (v) {
        return Data_Functor.map(dictFunctor)(function (f) {
            return function (t) {
                return new Data_Tuple.Tuple(f(t), t);
            };
        })(v);
    };
};
var comonadTracedTracedT = function (dictComonad) {
    return function (dictMonoid) {
        return {
            track: function (t) {
                return function (v) {
                    return Control_Comonad.extract(dictComonad)(v)(t);
                };
            },
            Comonad0: function () {
                return Control_Comonad_Traced_Trans.comonadTracedT(dictComonad)(dictMonoid);
            }
        };
    };
};
var censor = function (dictFunctor) {
    return function (f) {
        return function (v) {
            return Data_Functor.map(dictFunctor)(function (v1) {
                return function ($19) {
                    return v1(f($19));
                };
            })(v);
        };
    };
};
module.exports = {
    track: track,
    tracks: tracks,
    listen: listen,
    listens: listens,
    censor: censor,
    comonadTracedTracedT: comonadTracedTracedT
};
