"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var function_1 = require("fp-ts/lib/function");
var Option_1 = require("fp-ts/lib/Option");
var monocle_ts_1 = require("monocle-ts");
/** Lifts a function operate over newtypes */
exports.over = function (f) {
    return new monocle_ts_1.Getter(f);
};
exports.getSetoid = function (S) { return S; };
exports.getOrd = function (O) { return O; };
exports.getSemigroup = function (S) { return S; };
exports.getMonoid = function (M) { return M; };
exports.getSemiring = function (S) { return S; };
exports.getRing = function (R) { return R; };
exports.getField = function (F) { return F; };
//
// isomorphisms
//
exports.unsafeCoerce = function (a) { return a; };
var anyIso = new monocle_ts_1.Iso(exports.unsafeCoerce, exports.unsafeCoerce);
exports.iso = function () { return anyIso; };
exports.prism = function (predicate) {
    return new monocle_ts_1.Prism(function (s) { return (predicate(s) ? Option_1.some(s) : Option_1.none); }, function_1.identity);
};
//# sourceMappingURL=index.js.map