UNPKG

@dillonkearns/elm-graphql

Version:

<img src="https://cdn.jsdelivr.net/gh/martimatix/logo-graphqelm/logo.svg" alt="dillonearns/elm-graphql logo" width="40%" align="right">

37 lines (29 loc) 681 B
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.simm = simm; exports.coerce = coerce; exports.coerceSymm = coerceSymm; exports.refl = refl; exports.subst = subst; var _HKT = require('./HKT'); var _Unsafe = require('./Unsafe'); var _Identity = require('./Identity'); function simm(proof) { return (0, _Unsafe.unsafeCoerce)(proof); } function coerce(proof) { return function (a) { return (0, _Identity.extract)(proof((0, _Identity.of)(a))); }; } function coerceSymm(proof) { return coerce(simm(proof)); } function refl() { return (0, _Unsafe.unsafeCoerce)(_Identity.id); } function subst(proof, fa) { return proof(fa); }