|
| 1 | +(* Copyright (C) 2015-2016 Bloomberg Finance L.P. |
| 2 | + * |
| 3 | + * This program is free software: you can redistribute it and/or modify |
| 4 | + * it under the terms of the GNU Lesser General Public License as published by |
| 5 | + * the Free Software Foundation, either version 3 of the License, or |
| 6 | + * (at your option) any later version. |
| 7 | + * |
| 8 | + * In addition to the permissions granted to you by the LGPL, you may combine |
| 9 | + * or link a "work that uses the Library" with a publicly distributed version |
| 10 | + * of this file to produce a combined library or application, then distribute |
| 11 | + * that combined work under the terms of your choosing, with no requirement |
| 12 | + * to comply with the obligations normally placed on you by section 4 of the |
| 13 | + * LGPL version 3 (or the corresponding section of a later version of the LGPL |
| 14 | + * should you choose to use a later version). |
| 15 | + * |
| 16 | + * This program is distributed in the hope that it will be useful, |
| 17 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 18 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 19 | + * GNU Lesser General Public License for more details. |
| 20 | + * |
| 21 | + * You should have received a copy of the GNU Lesser General Public License |
| 22 | + * along with this program; if not, write to the Free Software |
| 23 | + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) |
| 24 | + |
| 25 | + |
| 26 | + |
| 27 | + |
| 28 | + |
| 29 | + |
| 30 | + |
| 31 | + |
| 32 | +(* if we allow a ppx like [%bs.uncurry [@n]], we would allow creating this |
| 33 | + external functions dynamically. |
| 34 | + It can not reduce dependency on [Js_fn] though, since the type depends |
| 35 | + on it. |
| 36 | + Example: |
| 37 | + {[ |
| 38 | + let v = [%bs.uncurry 3 f ] |
| 39 | + ]} |
| 40 | +*) |
| 41 | + |
| 42 | + |
| 43 | +type + 'a t |
| 44 | + |
| 45 | +external mk0 : (unit -> 'a0) -> 'a0 t = |
| 46 | + "js_fn_mk_00" |
| 47 | + |
| 48 | +external run0 : 'a0 t -> 'a0 = "js_fn_run_00" |
| 49 | + |
| 50 | +external mk1 : ('a0 -> 'a1) -> ('a0 * 'a1) t = |
| 51 | + "js_fn_mk_01" |
| 52 | + |
| 53 | +external run1 : ('a0 * 'a1) t -> 'a0 -> 'a1 = |
| 54 | + "js_fn_run_01" |
| 55 | + |
| 56 | +external mk2 : ('a0 -> 'a1 -> 'a2 ) -> ('a0 * 'a1 * 'a2) t = |
| 57 | + "js_fn_mk_02" |
| 58 | + |
| 59 | +external run2 : ('a0 * 'a1 * 'a2 )t -> 'a0 -> 'a1 -> 'a2 = |
| 60 | + "js_fn_run_02" |
| 61 | + |
| 62 | +external mk3 : |
| 63 | + ('a0 -> 'a1 -> 'a2 -> 'a3 ) -> ('a0 * 'a1 * 'a2 * 'a3) t = |
| 64 | + "js_fn_mk_03" |
| 65 | + |
| 66 | +external run3 : |
| 67 | + ('a0 * 'a1 * 'a2 * 'a3) t -> 'a0 -> 'a1 -> 'a2 -> 'a3 = |
| 68 | + "js_fn_run_03" |
| 69 | + |
| 70 | +external mk4 : ('a0 -> 'a1 -> 'a2 -> 'a3 -> 'a4 ) |
| 71 | + -> ('a0 * 'a1 * 'a2 * 'a3 * 'a4) t = |
| 72 | + "js_fn_mk_04" |
| 73 | + |
| 74 | +external run4 : ('a0 * 'a1 * 'a2 * 'a3 * 'a4) t -> |
| 75 | + 'a0 -> 'a1 -> 'a2 -> 'a3 -> 'a4 = |
| 76 | + "js_fn_run_04" |
| 77 | + |
| 78 | +external mk5 : |
| 79 | + ('a0 -> 'a1 -> 'a2 -> 'a3 -> 'a4 -> 'a5 ) -> |
| 80 | + ('a0 * 'a1 * 'a2 * 'a3 * 'a4 * 'a5) t = |
| 81 | + "js_fn_mk_05" |
| 82 | + |
| 83 | +external run5 : |
| 84 | + ('a0 * 'a1 * 'a2 * 'a3 * 'a4 * 'a5) t |
| 85 | + -> 'a0 -> 'a1 -> 'a2 -> 'a3 -> 'a4 -> 'a5 = |
| 86 | + "js_fn_run_05" |
| 87 | + |
| 88 | +external mk6 : ('a0 -> 'a1 -> 'a2 -> 'a3 -> 'a4 -> 'a5 -> 'a6) -> |
| 89 | + ('a0 * 'a1 * 'a2 * 'a3 * 'a4 * 'a5 * 'a6) t = |
| 90 | + "js_fn_mk_06" |
| 91 | +external run6 : ('a0 * 'a1 * 'a2 * 'a3 * 'a4 * 'a5 * 'a6) t |
| 92 | + -> 'a0 -> 'a1 -> 'a2 -> 'a3 -> 'a4 -> 'a5 -> 'a6 = |
| 93 | + "js_fn_run_06" |
| 94 | + |
| 95 | +external mk7 : ('a0 -> 'a1 -> 'a2 -> 'a3 -> 'a4 -> 'a5 -> 'a6 -> 'a7) -> |
| 96 | + ('a0 * 'a1 * 'a2 * 'a3 * 'a4 * 'a5 * 'a6 * 'a7 ) t = |
| 97 | + "js_fn_mk_07" |
| 98 | + |
| 99 | +external run7 : ('a0 * 'a1 * 'a2 * 'a3 * 'a4 * 'a5 * 'a6 * 'a7 ) t |
| 100 | + -> 'a0 -> 'a1 -> 'a2 -> 'a3 -> 'a4 -> 'a5 -> 'a6 -> 'a7 = |
| 101 | + "js_fn_run_07" |
| 102 | + |
| 103 | +external mk8 : ('a0 -> 'a1 -> 'a2 -> 'a3 -> 'a4 -> 'a5 -> 'a6 -> 'a7 -> 'a8 ) -> |
| 104 | + ('a0 * 'a1 * 'a2 * 'a3 * 'a4 * 'a5 * 'a6 * 'a7 * 'a8 ) t = |
| 105 | + "js_fn_mk_08" |
| 106 | + |
| 107 | +external run8 : |
| 108 | + ('a0 * 'a1 * 'a2 * 'a3 * 'a4 * 'a5 * 'a6 * 'a7 * 'a8 ) t -> |
| 109 | + 'a0 -> 'a1 -> 'a2 -> 'a3 -> 'a4 -> 'a5 -> 'a6 -> 'a7 -> 'a8 |
| 110 | + = |
| 111 | + "js_fn_run_08" |
| 112 | + |
| 113 | +external mk9 : |
| 114 | + ('a0 -> 'a1 -> 'a2 -> 'a3 -> 'a4 -> 'a5 -> 'a6 -> 'a7 -> 'a8 -> 'a9) -> |
| 115 | + ('a0 * 'a1 * 'a2 * 'a3 * 'a4 * 'a5 * 'a6 * 'a7 * 'a8 * 'a9 ) t = |
| 116 | + "js_fn_mk_09" |
| 117 | + |
| 118 | +external run9 : |
| 119 | + ('a0 * 'a1 * 'a2 * 'a3 * 'a4 * 'a5 * 'a6 * 'a7 * 'a8 * 'a9 ) t -> |
| 120 | + 'a0 -> 'a1 -> 'a2 -> 'a3 -> 'a4 -> 'a5 -> 'a6 -> 'a7 -> 'a8 -> 'a9 = |
| 121 | + "js_fn_run_09" |
0 commit comments