0 | ||| JSIO based on idris2-dom JSIO utilities, which is adjusted to this library.
16 | javascript:lambda:
17 | (tya, cb) => {
18 | try {
19 | const result = cb()
20 | return _right(result)
21 | } catch(e) {
22 | if (e instanceof Error) {
23 | return _left(e)
24 | }
25 | return _left(new Error(e))
26 | }
27 | }
28 | """
31 | export
35 | ||| Support Javascript exception handling when lifting IO to JSIO
36 | export