purescript-lua
purescript-lua copied to clipboard
Purescript compiler back-end for Lua
```lua local add = function(x) return function(y) return x + y end end ``` is two times slower than ```lua local add = function(x, y) return x + y end...
Currently purescript-lua only support bundling, I.e. merging all the modules into the one lua file. However it is often needed to keep the initial directory structure and keep lua modules...
The usage of `Data.Lens._Newtype` includes `_Newtype` in the output, but it compiles incorrectly into: ```lua M.MyModule__Newtype = M.Data_Profunctor_dimap(dictProfunctor)(M.Safe_Coerce_coerce()) ``` where `dictProfunctor` is undefined in the output lua module. I suppose...
The error is: ``` PS Lua: compiling ... pslua: Impossible subexpressions: IfThenElse CallStack (from HasCallStack): error, called at src/Relude/Debug.hs:296:11 in relude-1.2.1.0-InE73P0BzGI4tF0Ie3lTIC:Relude.Debug error, called at lib/Language/PureScript/Backend/Lua/Optimizer.hs:202:17 in pslua-0.1.0.0-2hkO0AwfMEO5Nw1JAHZE53:Language.PureScript.Backend.Lua.Optimizer ``` ## How...
As the title says. I tried to get tests working for the Prelude, and I was mostly successful, with the caveat that the inclusion of the Generic tests causes a...
An attempt to reproduce SO reported in #32 I couldn't reproduce the reported problem. 1. [PureScript golden test source ](https://github.com/Unisay/purescript-lua/pull/33/files#diff-370d04772d39f4ea07f37b89560bf8faf564a3297ac0e3eab8406390540c880d) 2. [`main.lua` ](https://github.com/Unisay/purescript-lua/pull/33/files#diff-8586b4bd532fe7d5086aa36fbf5498b2d0572699854f56cca7d650b7e91271b3) to run the compiled module. Produces the...
A compilation in some cases may produce invalid lua that is fails at runtime. I have not figured out what exactly causes this behavior but succeeded to catch some example....
Add golden test reproducing the scenario from issue #37 where monadic code with nested do-blocks and function composition previously generated invalid Lua code with undefined variable references (Bind11). The test...
The [module](https://github.com/Unisay/purescript-lua-strings/blob/master/src/Data/String/CodePoints.lua#L3) is still in todo-state and implemented as: ```lua return { _toCodePointArray = (function (str) error("Not implemented: _toCodePointArray") end), _fromCodePointArray = (function (codePoints) error("Not implemented: _fromCodePointArray") end), } ```...