We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
From ffi
exports.runFn3 = function (fn) { return function (a) { return function (b) { return function (c) { return fn(a, b, c); }; }; }; };
main.purs
module Main where import Prelude import Data.Function.Uncurried x :: Fn3 Int Int Int Int -> Int x f = runFn3 f 1 2 3
output/Main/index.js
"use strict"; var Data_Function_Uncurried = require("../Data.Function.Uncurried"); var Prelude = require("../Prelude"); var x = function (f) { return f(1, 2, 3); }; module.exports = { x: x };
But just looking at this library I assume output would have been like runFn3(f)(1)(2)(3), but looks like there is some compiler optimization going on.
runFn3(f)(1)(2)(3)
search for runFn in https://github.com/purescript/purescript/blob/0ebc45779ed21ee16c2fb48a3a2c42544a560512/src/Language/PureScript/CoreImp/Optimizer/Inliner.hs
Would be nice to add a bit of comment about that, note x f = let z = runFn3 f in f 1 2 3 is not optimised.
x f = let z = runFn3 f in f 1 2 3
The text was updated successfully, but these errors were encountered:
No branches or pull requests
From ffi
main.purs
output/Main/index.js
But just looking at this library I assume output would have been like
runFn3(f)(1)(2)(3)
, but looks like there is some compiler optimization going on.search for runFn in https://github.com/purescript/purescript/blob/0ebc45779ed21ee16c2fb48a3a2c42544a560512/src/Language/PureScript/CoreImp/Optimizer/Inliner.hs
Would be nice to add a bit of comment about that, note
x f = let z = runFn3 f in f 1 2 3
is not optimised.The text was updated successfully, but these errors were encountered: