Since unit is being represented as nil in the generated lua, all arrays of type Array Unit are treated as empty.
minimal example:
module Main where
import Prelude
import Effect (Effect)
import Effect.Console (logShow)
import Data.Array (length)
main :: Effect Unit
main = logShow $ length [unit, unit, unit]
generates
local M = {}
M.Data_Unit_foreign = { unit = nil }
return (function(s) return function() print(s) end end)((function(n) return tostring(n) end)((function(xs) return #xs end)({
[1] = M.Data_Unit_foreign.unit,
[2] = M.Data_Unit_foreign.unit,
[3] = M.Data_Unit_foreign.unit
})))()
and outputs 0 when run.
Any expression that uses the array implementation of guard will be affected by this.
Since
unitis being represented asnilin the generated lua, all arrays of typeArray Unitare treated as empty.minimal example:
generates
and outputs 0 when run.
Any expression that uses the array implementation of
guardwill be affected by this.