Created
March 7, 2014 22:57
-
-
Save joneshf/9421913 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
➜ purescript git:(master) ✗ ./.cabal-sandbox/bin/psc --no-prelude -s | |
module Foo where | |
f = \o -> o {foo = 3} | |
(function (_ps) { | |
"use strict"; | |
_ps.Foo = (function (module) { | |
var f = function (o) { | |
var newObj = {}; | |
for (var key in o) { | |
if (o.hasOwnProperty(key)) { | |
newObj[key] = o[key]; | |
}; | |
}; | |
newObj[foo] = 3; | |
return newObj; | |
}; | |
module.f = f; | |
return module; | |
})(_ps.Foo || {}); | |
})((typeof module !== "undefined" && module.exports) ? module.exports : (typeof window !== "undefined") ? window.PS = window.PS || {} : (function () { | |
throw "PureScript doesn't know how to export modules in the current environment"; | |
})()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
➜ purescript git:(master) ✗ ./.cabal-sandbox/bin/psc --no-prelude -s | |
module Foo where | |
f o = o {foo = 3} | |
(function (_ps) { | |
"use strict"; | |
_ps.Foo = (function (module) { | |
var f = function (_1) { | |
return (function () { | |
var newObj = {}; | |
for (var key in _1) { | |
if (_1.hasOwnProperty(key)) { | |
newObj[key] = _1[key]; | |
}; | |
}; | |
newObj[foo] = 3; | |
return newObj; | |
})(); | |
throw "Failed pattern match"; | |
}; | |
module.f = f; | |
return module; | |
})(_ps.Foo || {}); | |
})((typeof module !== "undefined" && module.exports) ? module.exports : (typeof window !== "undefined") ? window.PS = window.PS || {} : (function () { | |
throw "PureScript doesn't know how to export modules in the current environment"; | |
})()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment