1// Generated by purs version 0.15.16
2import * as Control_Alternative from "../Control.Alternative/index.js";
3import * as Control_Category from "../Control.Category/index.js";
4import * as Data_Either from "../Data.Either/index.js";
5import * as Data_Eq from "../Data.Eq/index.js";
6import * as Data_Function from "../Data.Function/index.js";
7import * as Data_Functor from "../Data.Functor/index.js";
8import * as Data_HeytingAlgebra from "../Data.HeytingAlgebra/index.js";
9import * as Data_Lens_Internal_Market from "../Data.Lens.Internal.Market/index.js";
10import * as Data_Lens_Internal_Tagged from "../Data.Lens.Internal.Tagged/index.js";
11import * as Data_Lens_Types from "../Data.Lens.Types/index.js";
12import * as Data_Maybe from "../Data.Maybe/index.js";
13import * as Data_Newtype from "../Data.Newtype/index.js";
14import * as Data_Profunctor from "../Data.Profunctor/index.js";
15import * as Data_Profunctor_Choice from "../Data.Profunctor.Choice/index.js";
16import * as Data_Traversable from "../Data.Traversable/index.js";
17var identity = /* #__PURE__ */ Control_Category.identity(Control_Category.categoryFn);
18var guard = /* #__PURE__ */ Control_Alternative.guard(Data_Maybe.alternativeMaybe);
19var withPrism = function (l) {
21 var v = l(new Data_Lens_Internal_Market.Market(identity, Data_Either.Right.create));
22 return f(v.value0)(v.value1);
25var review = /* #__PURE__ */ Data_Newtype.under()()(Data_Lens_Internal_Tagged.Tagged);
26var prism = function (to) {
27 return function (fro) {
28 return function (dictChoice) {
29 var Profunctor0 = dictChoice.Profunctor0();
30 var dimap = Data_Profunctor.dimap(Profunctor0);
31 var right = Data_Profunctor_Choice.right(dictChoice);
32 var rmap = Data_Profunctor.rmap(Profunctor0);
33 return function (pab) {
34 return dimap(fro)(Data_Either.either(identity)(identity))(right(rmap(to)(pab)));
39var prism$prime = function (to) {
40 return function (fro) {
41 return function (dictChoice) {
42 return prism(to)(function (s) {
43 return Data_Maybe.maybe(new Data_Either.Left(s))(Data_Either.Right.create)(fro(s));
48var nearly = function (x) {
50 return function (dictChoice) {
51 return prism$prime(Data_Function["const"](x))(function ($38) {
57var only = function (dictEq) {
58 var eq = Data_Eq.eq(dictEq);
60 return function (dictChoice) {
61 return nearly(x)(function (v) {
67var matching = function (l) {
68 return withPrism(l)(function (v) {
74var is = function (dictHeytingAlgebra) {
75 var ff = Data_HeytingAlgebra.ff(dictHeytingAlgebra);
76 var tt = Data_HeytingAlgebra.tt(dictHeytingAlgebra);
78 var $39 = Data_Either.either(Data_Function["const"](ff))(Data_Function["const"](tt));
79 var $40 = matching(l);
80 return function ($41) {
85var isn$primet = function (dictHeytingAlgebra) {
86 var not = Data_HeytingAlgebra.not(dictHeytingAlgebra);
87 var is1 = is(dictHeytingAlgebra);
90 return function ($43) {
95var clonePrism = function (l) {
96 return function (dictChoice) {
97 return withPrism(l)(function (x) {
100 return prism(x)(y)(dictChoice)(p);
106var below = function (dictTraversable) {
107 var map = Data_Functor.map(dictTraversable.Functor0());
108 var traverse = Data_Traversable.traverse(dictTraversable)(Data_Either.applicativeEither);
109 return function (k) {
110 return function (dictChoice) {
111 return withPrism(k)(function (bt) {
112 return function (seta) {
113 return prism(map(bt))(function (s) {
114 var v = traverse(seta)(s);
115 if (v instanceof Data_Either.Left) {
116 return new Data_Either.Left(s);
118 if (v instanceof Data_Either.Right) {
119 return new Data_Either.Right(v.value0);
121 throw new Error("Failed pattern match at Data.Lens.Prism (line 199, column 7 - line 201, column 27): " + [ v.constructor.name ]);
141//# sourceMappingURL=index.js.map
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list