Unisay / purescript-lua

Purescript compiler back-end for Lua
GNU General Public License v3.0
56 stars 2 forks source link

`Data.Lens._Newtype` is compiling incorrectly #28

Open Renegatto opened 2 months ago

Renegatto commented 2 months ago

The usage of Data.Lens._Newtype includes _Newtype in the output, but it compiles incorrectly into:

M.MyModule__Newtype = M.Data_Profunctor_dimap(dictProfunctor)(M.Safe_Coerce_coerce())

where dictProfunctor is undefined in the output lua module. I suppose it should have compiled into something like

M.MyModule__Newtype = function (dictProfunctor)
  return M.Data_Profunctor_dimap(dictProfunctor)(M.Safe_Coerce_coerce())
end
Renegatto commented 2 months ago

Most likely it was cc32d90b291f3d828747b31424db321a23b8f957 that has been fixed in develop, I will check.

Unisay commented 1 month ago

I have backported the bugix, please test and close the issue if you confirm that bug has gone. Thanks!