Skip to content

Commit

Permalink
chore: Update snapshots and bump version for release
Browse files Browse the repository at this point in the history
  • Loading branch information
aboeglin committed May 2, 2021
1 parent 4311fa1 commit 6a4cf46
Show file tree
Hide file tree
Showing 11 changed files with 157 additions and 157 deletions.
2 changes: 1 addition & 1 deletion .snapshots/should_build_all_internal_JS_functions/golden
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ global.__eq__ = (l, r) => {

const __applyMany__ = (f, params) => params.reduce((_f, param) => _f(param), f);
global.__apMtdDicts__ = (dict, dicts) =>
Object.keys(dict).reduce((o, k) => ({ ...o, [k]: __applyMany__(dict[k], dicts) }), {});
Object.keys(dict).reduce((o, k) => ({ ...o, [k]: () => __applyMany__(dict[k](), dicts) }), {});

global.__once__ = (fn, context) => {

Expand Down
8 changes: 4 additions & 4 deletions .snapshots/should_compile_JSX/golden
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ let OnMouseOut = (a => ({ __constructor: "OnMouseOut", __args: [ a ] }));
global.Show = {};
global.Functor = {};
Show['Number'] = {};
Show['Number']['show'] = (x => new Number(x).toString());
Show['Number']['show'] = () => (x => new Number(x).toString());
Functor['List'] = {};
Functor['List']['map'] = (f => xs => xs.map((x) => f(x)));
Functor['List']['map'] = () => (f => xs => xs.map((x) => f(x)));
export let good = (a => Wish((_ => goodCB => goodCB(a))));
export let id = AttributeId;
export let className = AttributeClass;
Expand All @@ -26,11 +26,11 @@ export let p = (attrs => children => h('p', objectifyAttrs(attrs), children));
export let input = (attrs => children => h('input', objectifyAttrs(attrs), children));
export let button = (attrs => children => h('button', objectifyAttrs(attrs), children));
let initialState = 0;
let MyApp = (count => div(([id("id"), className("class")]))(([div(([]))(([text(`Current count is ${Show.Number.show(count)}`)])), div(([]))(([button(([onClick((state => event => ([good((s => s + 1))])))]))(([text("increment")]))]))])));
let MyApp = (count => div(([id("id"), className("class")]))(([div(([]))(([text(`Current count is ${Show.Number.show()(count)}`)])), div(([]))(([button(([onClick((state => event => ([good((s => s + 1))])))]))(([text("increment")]))]))])));
div(([]))(([text("Some text!")]));
div(([]))(([div(([]))(([span(([]))(([]))])), div(([]))(([span(([]))(([]))]))]));
let methods = (['1', '2', '3']);
let childElems = Functor.List.map((method => div(([]))(([method]))))(methods);
let childElems = Functor.List.map()((method => div(([]))(([method]))))(methods);
div(([]))(([ ...((f) => (xs) => xs.map(f))(text)(methods)]));
div(([]))(([ ...childElems]));
export default { good, id, className, onClick, onMouseOver, onMouseOut, text, div, span, p, input, button, Wish };
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ global.Functor = {};
global.Applicative = {};
global.Monad = {};
Functor['Wish'] = {};
Functor['Wish']['map'] = (f => m => Wish((bad => good => ((__x__) => {
Functor['Wish']['map'] = () => (f => m => Wish((bad => good => ((__x__) => {
if (__x__.__constructor === "Wish" && true) {
let run = __x__.__args[0];
return run(bad)((x => good(f(x))));
Expand All @@ -16,7 +16,7 @@ Functor['Wish']['map'] = (f => m => Wish((bad => good => ((__x__) => {
}
})(m))));
Applicative['Wish'] = {};
Applicative['Wish']['ap'] = (mf => m => Wish((bad => good => ((__x__) => {
Applicative['Wish']['ap'] = () => (mf => m => Wish((bad => good => ((__x__) => {
if (__x__.length === 2 && __x__[0].__constructor === "Wish" && true && __x__[1].__constructor === "Wish" && true) {
let [{ __args: [runMF]},{ __args: [runM]}] = __x__;
return runM(bad)((x => runMF(bad)((f => good(f(x))))));
Expand All @@ -27,9 +27,9 @@ Applicative['Wish']['ap'] = (mf => m => Wish((bad => good => ((__x__) => {
throw 'non exhaustive patterns!';
}
})(([mf, m])))));
Applicative['Wish']['pure'] = (a => Wish((bad => good => good(a))));
Applicative['Wish']['pure'] = () => (a => Wish((bad => good => good(a))));
Monad['Wish'] = {};
Monad['Wish']['chain'] = (f => m => Wish((bad => good => ((__x__) => {
Monad['Wish']['chain'] = () => (f => m => Wish((bad => good => ((__x__) => {
if (__x__.__constructor === "Wish" && true) {
let run = __x__.__args[0];
return run(bad)((x => ((__x__) => {
Expand All @@ -50,7 +50,7 @@ Monad['Wish']['chain'] = (f => m => Wish((bad => good => ((__x__) => {
throw 'non exhaustive patterns!';
}
})(m))));
Monad['Wish']['of'] = Applicative.Wish.pure;
Monad['Wish']['of'] = () => Applicative.Wish.pure();
export let mapRej = (f => m => Wish((bad => good => ((__x__) => {
if (__x__.__constructor === "Wish" && true) {
let run = __x__.__args[0];
Expand Down Expand Up @@ -127,5 +127,5 @@ export default { mapRej, chainRej, good, bad, parallel, fulfill, Wish };
import {} from "./__internals__.mjs"
import W from "./.prelude/Wish.mjs";

W.fulfill((a => ({ __constructor: "Unit", __args: [] })))((a => ({ __constructor: "Unit", __args: [] })))(Functor.Wish.map((x => x + '!'))(Monad.Wish.chain((x => Monad.Wish.of(`finally a string`)))(Monad.Wish.chain((x => Monad.Wish.of(x * 3)))(Functor.Wish.map((x => x % 2))(Monad.Wish.of(3))))));
W.fulfill((a => ({ __constructor: "Unit", __args: [] })))((a => ({ __constructor: "Unit", __args: [] })))(Functor.Wish.map()((x => x + '!'))(Monad.Wish.chain()((x => Monad.Wish.of()(`finally a string`)))(Monad.Wish.chain()((x => Monad.Wish.of()(x * 3)))(Functor.Wish.map()((x => x % 2))(Monad.Wish.of()(3))))));
export default {};
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,22 @@ let Right = (a => ({ __constructor: "Right", __args: [ a ] }));
let Left = (a => ({ __constructor: "Left", __args: [ a ] }));
global.Show = {};
Show['Boolean'] = {};
Show['Boolean']['show'] = (b => (b ? 'True' : 'False'));
Show['Boolean']['show'] = () => (b => (b ? 'True' : 'False'));
Show['Number'] = {};
Show['Number']['show'] = (n => new Number(n).toString());
Show['Number']['show'] = () => (n => new Number(n).toString());
Show['Tuple_2'] = {};
let __ShowTuple_2show = __once__(() => (__x__ => ((__x__) => {
if (__x__.length === 2 && true && true) {
let [a,b] = __x__;
return '<' + Show_i8.show(a) + ', ' + Show_j9.show(b) + '>';
return '<' + Show_i8.show()(a) + ', ' + Show_j9.show()(b) + '>';
}
else {
console.log('non exhaustive patterns for value: ', __x__.toString());
console.trace();
throw 'non exhaustive patterns!';
}
})(__x__)));
Show['Tuple_2']['show'] = (Show_j9) => (Show_i8) => {
Show['Tuple_2']['show'] = () => (Show_j9) => (Show_i8) => {
global.Show_i8 = Show_i8
global.Show_j9 = Show_j9
return __ShowTuple_2show();
Expand All @@ -27,15 +27,15 @@ Show['Tuple_3'] = {};
let __ShowTuple_3show = __once__(() => (__x__ => ((__x__) => {
if (__x__.length === 3 && true && true && true) {
let [a,b,c] = __x__;
return '<' + Show_b27.show(a) + ', ' + Show_c28.show(b) + ', ' + Show_d29.show(c) + '>';
return '<' + Show_b27.show()(a) + ', ' + Show_c28.show()(b) + ', ' + Show_d29.show()(c) + '>';
}
else {
console.log('non exhaustive patterns for value: ', __x__.toString());
console.trace();
throw 'non exhaustive patterns!';
}
})(__x__)));
Show['Tuple_3']['show'] = (Show_d29) => (Show_c28) => (Show_b27) => {
Show['Tuple_3']['show'] = () => (Show_d29) => (Show_c28) => (Show_b27) => {
global.Show_b27 = Show_b27
global.Show_c28 = Show_c28
global.Show_d29 = Show_d29
Expand All @@ -45,31 +45,31 @@ Show['Either'] = {};
let __ShowEithershow = __once__(() => (__x__ => ((__x__) => {
if (__x__.__constructor === "Right" && true) {
let a = __x__.__args[0];
return 'Right ' + Show_c54.show(a);
return 'Right ' + Show_c54.show()(a);
}
else if (__x__.__constructor === "Left" && true) {
let e = __x__.__args[0];
return 'Left ' + Show_f57.show(e);
return 'Left ' + Show_f57.show()(e);
}
else {
console.log('non exhaustive patterns for value: ', __x__.toString());
console.trace();
throw 'non exhaustive patterns!';
}
})(__x__)));
Show['Either']['show'] = (Show_c54) => (Show_f57) => {
Show['Either']['show'] = () => (Show_c54) => (Show_f57) => {
global.Show_f57 = Show_f57
global.Show_c54 = Show_c54
return __ShowEithershow();
};
Show.Tuple_2.show(Show.Boolean)(Show.Number)(([1, false]));
Show.Either.show(Show.Number)(Show.Number)(Right(3));
Show.Tuple_2.show()(Show.Boolean)(Show.Number)(([1, false]));
Show.Either.show()(Show.Number)(Show.Number)(Right(3));
let fnWithConstraint = (Show_k88) => {
global.Show_k88 = Show_k88

return fnWithConstraint__ND__()
};
let fnWithConstraint__ND__ = __once__(() => Show_k88.show);
Show.Tuple_2.show(Show.Number)(Show.Number)(([1, 1]));
Show.Tuple_3.show(Show.Boolean)(Show.Number)(Show.Boolean)(([false, 42, true]));
let fnWithConstraint__ND__ = __once__(() => Show_k88.show());
Show.Tuple_2.show()(Show.Number)(Show.Number)(([1, 1]));
Show.Tuple_3.show()(Show.Boolean)(Show.Number)(Show.Boolean)(([false, 42, true]));
export default {};
26 changes: 13 additions & 13 deletions .snapshots/should_compile_interfaces_and_instances/golden
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ let Left = (a => ({ __constructor: "Left", __args: [ a ] }));
global.Functor = {};
global.Monad = {};
Functor['Maybe'] = {};
Functor['Maybe']['map'] = (f => __x__ => ((__x__) => {
Functor['Maybe']['map'] = () => (f => __x__ => ((__x__) => {
if (__x__.__constructor === "Just" && true) {
let x = __x__.__args[0];
return Just(f(x));
Expand All @@ -21,10 +21,10 @@ Functor['Maybe']['map'] = (f => __x__ => ((__x__) => {
}
})(__x__));
Functor['List'] = {};
Functor['List']['map'] = (f => __x__ => ((__x__) => {
Functor['List']['map'] = () => (f => __x__ => ((__x__) => {
if (__x__.length >= 2 && true && true) {
let [h,...t] = __x__;
return ([f(h), ...Functor.List.map(f)(t)]);
return ([f(h), ...Functor.List.map()(f)(t)]);
}
else if (__x__.length === 1 && true) {
let [l] = __x__;
Expand All @@ -41,7 +41,7 @@ Functor['List']['map'] = (f => __x__ => ((__x__) => {
}
})(__x__));
Monad['Maybe'] = {};
Monad['Maybe']['chain'] = (f => __x__ => ((__x__) => {
Monad['Maybe']['chain'] = () => (f => __x__ => ((__x__) => {
if (__x__.__constructor === "Just" && true) {
let x = __x__.__args[0];
return f(x);
Expand All @@ -55,9 +55,9 @@ Monad['Maybe']['chain'] = (f => __x__ => ((__x__) => {
throw 'non exhaustive patterns!';
}
})(__x__));
Monad['Maybe']['of'] = (x => Just(x));
Monad['Maybe']['of'] = () => (x => Just(x));
Monad['Either'] = {};
Monad['Either']['chain'] = (f => __x__ => ((__x__) => {
Monad['Either']['chain'] = () => (f => __x__ => ((__x__) => {
if (__x__.__constructor === "Right" && true) {
let x = __x__.__args[0];
return f(x);
Expand All @@ -72,34 +72,34 @@ Monad['Either']['chain'] = (f => __x__ => ((__x__) => {
throw 'non exhaustive patterns!';
}
})(__x__));
Monad['Either']['of'] = (x => Right(x));
Monad['Either']['of'] = () => (x => Right(x));
let inc = (a => a + 1);
Functor.List.map(inc)(([1, 2, 3]));
Monad.Maybe.chain((x => Just(x + 1)))(Just(3));
Functor.List.map()(inc)(([1, 2, 3]));
Monad.Maybe.chain()((x => Just(x + 1)))(Just(3));
let doIt = (Functor_q120) => {
global.Functor_q120 = Functor_q120

return doIt__ND__()
};
let doIt__ND__ = __once__(() => (x => Functor_q120.map((k => k + 1))(x)));
let doIt__ND__ = __once__(() => (x => Functor_q120.map()((k => k + 1))(x)));
doIt(Functor.Maybe)(Just(3));
let p = 1;
let fn = (Functor_i138) => {
global.Functor_i138 = Functor_i138

return fn__ND__()
};
let fn__ND__ = __once__(() => Functor_i138.map(inc));
let fn__ND__ = __once__(() => Functor_i138.map()(inc));
fn(Functor.Maybe)(Just(3));
fn(Functor.List)(([4, 5, 6]));
let hideCall = (x => ((__x__) => {
if (__x__.__constructor === "Just" && __x__.__args[0] === 2) {
return Monad.Either.chain((a => Right(a + 1)))(Right(2));
return Monad.Either.chain()((a => Right(a + 1)))(Right(2));
}
else {
console.log('non exhaustive patterns for value: ', __x__.toString());
console.trace();
throw 'non exhaustive patterns!';
}
})(Monad.Maybe.chain((a => Just(a + 1)))(x)));
})(Monad.Maybe.chain()((a => Just(a + 1)))(x)));
export default {};
Loading

0 comments on commit 6a4cf46

Please sign in to comment.