Title: Stack overflow in Prelude generic tests · Issue #32 · purescript-lua/purescript-lua · GitHub
Open Graph Title: Stack overflow in Prelude generic tests · Issue #32 · purescript-lua/purescript-lua
X Title: Stack overflow in Prelude generic tests · Issue #32 · purescript-lua/purescript-lua
Description: 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 stack overflow in the definition of eqList. This seems more plausibly to be a ...
Open Graph Description: 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 stack overflow in the definition of eq...
X Description: 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 stack overflow in the definition of eq...
Opengraph URL: https://github.com/purescript-lua/purescript-lua/issues/32
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Stack overflow in Prelude generic tests","articleBody":"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 stack overflow in the *definition* of `eqList`. This seems more plausibly to be a bug with the backend's implementation of `derive instance Generic` than an issue with the Prelude itself.\n\nSpecifically,\n```purs\ndata List a = Nil | Cons { head :: a, tail :: List a }\n\ncons :: forall a. a -> List a -> List a\ncons head tail = Cons { head, tail }\n\nderive instance genericList :: G.Generic (List a) _\n\ninstance eqList :: Eq a => Eq (List a) where\n eq x y = GEq.genericEq x y\n```\nresults in the offending definitions\n```lua\nM.Test_Data_Generic_Rep_eqList = function(dictEq)\n return {\n eq = M.Data_Eq_Generic_genericEq\n (M.Test_Data_Generic_Rep_genericList) \n (M.Test_Data_Generic_Rep_genericEqSum(\n M.Data_Eq_Generic_genericEqConstructor(\n M.Data_Eq_Generic_genericEqArgument(\n M.Test_Data_Generic_Rep_eqRec(\n M.Data_Eq_eqRowCons(\n M.Test_Data_Generic_Rep_eqRowCons\n (M.Test_Data_Generic_Rep_tailIsSymbol)\n (M.Test_Data_Generic_Rep_eqList(dictEq))\n )\n ()\n (M.Test_Data_Generic_Rep_headIsSymbol)\n (dictEq)\n )\n )\n )\n )\n )\n }\nend\nM.Test_Data_Generic_Rep_eqList1 = M.Test_Data_Generic_Rep_eqList(M.Data_Eq_eqInt)\n```\n(indents added for clarity.)","author":{"url":"https://github.com/UnrelatedString","@type":"Person","name":"UnrelatedString"},"datePublished":"2025-03-26T02:45:41Z","url":"https://github.com/purescript-lua/purescript-lua/issues/32"}
| 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:09bb2232-a618-0182-f68e-7eeb6bac5673 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B9C6:272DC0:57B6DA:7172CC:6B00DB5B |
| html-safe-nonce | e537ce9fa0172f265aafa8aaab25c46abe843a78977825748e18c0fd9f71a94f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCOUM2OjI3MkRDMDo1N0I2REE6NzE3MkNDOjZCMDBEQjVCIiwidmlzaXRvcl9pZCI6IjExMjU5NzY3Nzk5NjI1MDYwNzUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 939c51181fcf827bec22bededffb5b4d4adc96be7f3e53c8c5229764db2071b3 |
| hovercard-subject-tag | issue:2948245115 |
| 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/32/issue_layout |
| twitter:image | https://opengraph.githubassets.com/de689c832a6ce6e8df296d0759d6ec27234fda9a07a3331e29c999cd9685f69a/purescript-lua/purescript-lua/issues/32 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/de689c832a6ce6e8df296d0759d6ec27234fda9a07a3331e29c999cd9685f69a/purescript-lua/purescript-lua/issues/32 |
| og:image:alt | 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 stack overflow in the definition of eq... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | UnrelatedString |
| hostname | github.com |
| expected-hostname | github.com |
| None | 043c3f30fbcbe2c6c8e729e10cbbbc90c406546f9fbbb67c648d38f6b7d16daf |
| 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 | 5425dc24e8bd8d6fca9641a12afc984825a43875 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width