// Generated by purs version 0.14.5
"use strict";
var Data_Maybe = require("../Data.Maybe/index.js");
var Data_Monoid = require("../Data.Monoid/index.js");
var Data_Semigroup = require("../Data.Semigroup/index.js");
var Data_Show = require("../Data.Show/index.js");
var First = function (x) {
    return x;
};
var showFirst = function (dictShow) {
    return {
        show: function (v) {
            return "First (" + (Data_Show.show(Data_Maybe.showMaybe(dictShow))(v) + ")");
        }
    };
};
var semigroupFirst = {
    append: function (v) {
        return function (v1) {
            if (v instanceof Data_Maybe.Just) {
                return v;
            };
            return v1;
        };
    }
};
var ordFirst = function (dictOrd) {
    return Data_Maybe.ordMaybe(dictOrd);
};
var ord1First = Data_Maybe.ord1Maybe;
var newtypeFirst = {
    Coercible0: function () {
        return undefined;
    }
};
var monoidFirst = {
    mempty: Data_Maybe.Nothing.value,
    Semigroup0: function () {
        return semigroupFirst;
    }
};
var monadFirst = Data_Maybe.monadMaybe;
var invariantFirst = Data_Maybe.invariantMaybe;
var functorFirst = Data_Maybe.functorMaybe;
var extendFirst = Data_Maybe.extendMaybe;
var eqFirst = function (dictEq) {
    return Data_Maybe.eqMaybe(dictEq);
};
var eq1First = Data_Maybe.eq1Maybe;
var boundedFirst = function (dictBounded) {
    return Data_Maybe.boundedMaybe(dictBounded);
};
var bindFirst = Data_Maybe.bindMaybe;
var applyFirst = Data_Maybe.applyMaybe;
var applicativeFirst = Data_Maybe.applicativeMaybe;
var altFirst = {
    alt: Data_Semigroup.append(semigroupFirst),
    Functor0: function () {
        return functorFirst;
    }
};
var plusFirst = {
    empty: Data_Monoid.mempty(monoidFirst),
    Alt0: function () {
        return altFirst;
    }
};
var alternativeFirst = {
    Applicative0: function () {
        return applicativeFirst;
    },
    Plus1: function () {
        return plusFirst;
    }
};
var monadZeroFirst = {
    Monad0: function () {
        return monadFirst;
    },
    Alternative1: function () {
        return alternativeFirst;
    },
    MonadZeroIsDeprecated2: function () {
        return undefined;
    }
};
module.exports = {
    First: First,
    newtypeFirst: newtypeFirst,
    eqFirst: eqFirst,
    eq1First: eq1First,
    ordFirst: ordFirst,
    ord1First: ord1First,
    boundedFirst: boundedFirst,
    functorFirst: functorFirst,
    invariantFirst: invariantFirst,
    applyFirst: applyFirst,
    applicativeFirst: applicativeFirst,
    bindFirst: bindFirst,
    monadFirst: monadFirst,
    extendFirst: extendFirst,
    showFirst: showFirst,
    semigroupFirst: semigroupFirst,
    monoidFirst: monoidFirst,
    altFirst: altFirst,
    plusFirst: plusFirst,
    alternativeFirst: alternativeFirst,
    monadZeroFirst: monadZeroFirst
};
