Title: Arrays of type `Array Unit` are always empty · Issue #23 · purescript-lua/purescript-lua · GitHub
Open Graph Title: Arrays of type `Array Unit` are always empty · Issue #23 · purescript-lua/purescript-lua
X Title: Arrays of type `Array Unit` are always empty · Issue #23 · purescript-lua/purescript-lua
Description: 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 (...
Open Graph Description: 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 Effe...
X Description: 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 Effe...
Opengraph URL: https://github.com/purescript-lua/purescript-lua/issues/23
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Arrays of type `Array Unit` are always empty","articleBody":"Since `unit` is being represented as `nil` in the generated lua, all arrays of type `Array Unit` are treated as empty.\r\n\r\nminimal example:\r\n```purescript\r\nmodule Main where\r\n\r\nimport Prelude\r\nimport Effect (Effect)\r\nimport Effect.Console (logShow)\r\nimport Data.Array (length)\r\n\r\nmain :: Effect Unit\r\nmain = logShow $ length [unit, unit, unit]\r\n```\r\ngenerates\r\n```lua\r\nlocal M = {}\r\nM.Data_Unit_foreign = { unit = nil }\r\nreturn (function(s) return function() print(s) end end)((function(n) return tostring(n) end)((function(xs) return #xs end)({\r\n [1] = M.Data_Unit_foreign.unit,\r\n [2] = M.Data_Unit_foreign.unit,\r\n [3] = M.Data_Unit_foreign.unit\r\n})))()\r\n```\r\nand outputs 0 when run.\r\n\r\nAny expression that uses the array implementation of `guard` will be affected by this.","author":{"url":"https://github.com/sarahnya","@type":"Person","name":"sarahnya"},"datePublished":"2024-04-24T20:44:59Z","url":"https://github.com/purescript-lua/purescript-lua/issues/23"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:19265b70-9dde-c6cc-a8bc-812877ab9c19 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 905C:EA06E:AE5BDD:E1439B:6B00E44C |
| html-safe-nonce | 40e0212e93cbbade7fb92cc3c85bff943d6515bcf189b993bf65af748c576cf7 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MDVDOkVBMDZFOkFFNUJERDpFMTQzOUI6NkIwMEU0NEMiLCJ2aXNpdG9yX2lkIjoiMzk4NDQ3ODY3NDUzODc4MzgyMCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 965e8127eab276714f07851a3beacbb237a58036f50540461c9b16f4ccb05b21 |
| hovercard-subject-tag | issue:2262153734 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/purescript-lua/purescript-lua/23/issue_layout |
| twitter:image | https://opengraph.githubassets.com/2beac5a0810f13e0d3ea17d857cf35b44d1a2e237034cbdb58bc30150f3f37cc/purescript-lua/purescript-lua/issues/23 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/2beac5a0810f13e0d3ea17d857cf35b44d1a2e237034cbdb58bc30150f3f37cc/purescript-lua/purescript-lua/issues/23 |
| og:image:alt | 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 Effe... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | sarahnya |
| hostname | github.com |
| expected-hostname | github.com |
| None | 27088b6977484d0d3321d9a11c907c6d6637b315cfa359ef7952dbf6292f9b14 |
| turbo-cache-control | no-preview |
| go-import | github.com/purescript-lua/purescript-lua git https://github.com/purescript-lua/purescript-lua.git |
| octolytics-dimension-user_id | 131581790 |
| octolytics-dimension-user_login | purescript-lua |
| octolytics-dimension-repository_id | 587200487 |
| octolytics-dimension-repository_nwo | purescript-lua/purescript-lua |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 587200487 |
| octolytics-dimension-repository_network_root_nwo | purescript-lua/purescript-lua |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 624179fb8b88d26ba5bba08894eb60a1c5a1d93d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width