Title: purescript/maybe segfaults at runtime · Issue #37 · purescript-python/purescript-python · GitHub
Open Graph Title: purescript/maybe segfaults at runtime · Issue #37 · purescript-python/purescript-python
X Title: purescript/maybe segfaults at runtime · Issue #37 · purescript-python/purescript-python
Description: Is there another package for the Maybe monad that purescript-python supports? In normal purescript, I run spago install maybe to use the Maybe monad. However, if I try to do that with purescript-python, it compiles but segfaults at runti...
Open Graph Description: Is there another package for the Maybe monad that purescript-python supports? In normal purescript, I run spago install maybe to use the Maybe monad. However, if I try to do that with purescript-py...
X Description: Is there another package for the Maybe monad that purescript-python supports? In normal purescript, I run spago install maybe to use the Maybe monad. However, if I try to do that with purescript-py...
Opengraph URL: https://github.com/purescript-python/purescript-python/issues/37
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"purescript/maybe segfaults at runtime","articleBody":"Is there another package for the Maybe monad that purescript-python supports? In normal purescript, I run `spago install maybe` to use the Maybe monad. However, if I try to do that with purescript-python, it compiles but segfaults at runtime.\r\n\r\n```purs\r\nmodule Main where\r\n\r\nimport Prelude\r\n\r\nimport Effect (Effect)\r\nimport Effect.Console (log)\r\n\r\nimport Data.Maybe\r\n\r\nx :: Maybe Int\r\nx = Just 2\r\n\r\ny :: Maybe Int\r\ny = Nothing\r\n\r\nmain :: Effect Unit\r\nmain = do\r\n log \"🍝\"\r\n -- Doesn't matter which 3 branches are commented, all segfaults\r\n --log $ show x\r\n --log $ show y\r\n case x of\r\n Just i -\u003e log $ show i\r\n Nothing -\u003e log \"nothing\"\r\n\r\n```\r\n\r\n## Steps to reproduce\r\n```\r\ngit clone https://github.com/purescript-python/example-hw\r\ncd example-hw\r\n# See [1]\r\nspago upgrade-set\r\n# See [2]\r\nspago install prelude\r\nspago install maybe\r\n# Edit src/Main.purs as above\r\nspago build \u0026\u0026 pspy --run\r\n```\r\n\r\n## The output\r\n```\r\nCompiling Main\r\nWarning 1 of 2:\r\n\r\n in module Main\r\n at src/Main.purs:8:1 - 8:18 (line 8, column 1 - line 8, column 18)\r\n\r\n Module Data.Maybe has unspecified imports, consider using the explicit form:\r\n\r\n import Data.Maybe (Maybe(..))\r\n\r\n\r\n\r\n See https://github.com/purescript/documentation/blob/master/errors/ImplicitImport.md for more information,\r\n or to contribute content related to this warning.\r\n\r\nWarning 2 of 2:\r\n\r\n in module Main\r\n at src/Main.purs:3:1 - 3:15 (line 3, column 1 - line 3, column 15)\r\n\r\n Module Prelude has unspecified imports, consider using the explicit form:\r\n\r\n import Prelude (Unit, discard, show, ($))\r\n\r\n\r\n\r\n See https://github.com/purescript/documentation/blob/master/errors/ImplicitImport.md for more information,\r\n or to contribute content related to this warning.\r\n\r\n\r\n[info] Build succeeded.\r\nCodegen Python for Main\r\nCodegen Python for Control.Bind\r\nCodegen Python for Control.Applicative\r\nCodegen Python for Control.Apply\r\nCodegen Python for Control.Category\r\nCodegen Python for Control.Semigroupoid\r\nCodegen Python for Data.Function\r\nCodegen Python for Data.Boolean\r\nCodegen Python for Data.Ord\r\nCodegen Python for Data.Eq\r\nCodegen Python for Data.HeytingAlgebra\r\nCodegen Python for Data.Symbol\r\nCodegen Python for Type.Proxy\r\nCodegen Python for Data.Unit\r\nCodegen Python for Data.Show\r\nCodegen Python for Record.Unsafe\r\nCodegen Python for Data.Void\r\nCodegen Python for Data.Ordering\r\nCodegen Python for Data.Semigroup\r\nCodegen Python for Data.Ring\r\nCodegen Python for Data.Semiring\r\nCodegen Python for Data.Functor\r\nCodegen Python for Data.Maybe\r\nCodegen Python for Control.Alt\r\nCodegen Python for Control.Alternative\r\nCodegen Python for Control.Plus\r\nCodegen Python for Control.Extend\r\nCodegen Python for Control.Monad\r\nCodegen Python for Control.MonadZero\r\nCodegen Python for Data.Bounded\r\nCodegen Python for Data.Functor.Invariant\r\nCodegen Python for Data.Monoid.Additive\r\nCodegen Python for Data.Monoid\r\nCodegen Python for Data.EuclideanRing\r\nCodegen Python for Data.BooleanAlgebra\r\nCodegen Python for Data.CommutativeRing\r\nCodegen Python for Prelude\r\nCodegen Python for Data.DivisionRing\r\nCodegen Python for Data.Field\r\nCodegen Python for Data.NaturalTransformation\r\nCodegen Python for Data.Monoid.Alternate\r\nCodegen Python for Control.Comonad\r\nCodegen Python for Data.Newtype\r\nCodegen Python for Data.Monoid.Conj\r\nCodegen Python for Data.Monoid.Disj\r\nCodegen Python for Data.Monoid.Dual\r\nCodegen Python for Data.Monoid.Endo\r\nCodegen Python for Data.Monoid.Multiplicative\r\nCodegen Python for Data.Semigroup.First\r\nCodegen Python for Data.Semigroup.Last\r\nCodegen Python for Safe.Coerce\r\nCodegen Python for Unsafe.Coerce\r\nCodegen Python for Data.Generic.Rep\r\nCodegen Python for Effect\r\nCodegen Python for Effect.Console\r\n🍝\r\n[1] 3845030 segmentation fault (core dumped) pspy --run\r\n```\r\n\r\n## Expected output\r\n\r\nSame as purescript (Just 2)\r\n\r\n## Appendix\r\n\r\nProbably just the example repo being outdated\r\n\r\n[1] When trying to run `spago build` at this stage, I get this error:\r\n```\r\n[error] Oh noes! It looks like the PureScript version installed on your system is not compatible with the package-set you're using.\r\n\r\ninstalled `purs` version: 0.14.5\r\nminimum package-set version: 0.13.6\r\n\r\nThere are a few ways to solve this:\r\n- install a compatible `purs` version (i.e. in the same 'semver range' as the one in the package set)\r\n- if the `purs` version is 'too new', you can try using `spago upgrade-set` to upgrade to the latest package set\r\n- if you know what you're doing and you want to disable this check, you can override the `version` of the `metadata` package in the packages.dhall, e.g.:\r\n\r\n let upstream = \u003cpackage-set url here\u003e\r\n in upstream\r\n with metadata.version = \"v0.14.5\"\r\n\r\n```\r\n[2] When trying to run `spago build` at this stage, I get this error\r\n\r\n```\r\n[error] Some of your project files import modules from packages that are not in the direct dependencies of your project.\r\nTo fix this error add the following packages to the list of dependencies in your config:\r\n- prelude\r\nYou may add these dependencies by running the following command:\r\nspago install prelude\r\n```","author":{"url":"https://github.com/akazukin5151","@type":"Person","name":"akazukin5151"},"datePublished":"2021-12-01T14:37:16.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":9},"url":"https://github.com/37/purescript-python/issues/37"}
| 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:ccb9fe53-677a-bd16-7168-ddf1236dbff2 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BC12:28EEF5:40157FE:56DB1F8:69708C18 |
| html-safe-nonce | 862aec11dece65f464d4a85a9c8c289ba1b124eea1f24fdf21b1c888ad8c2066 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQzEyOjI4RUVGNTo0MDE1N0ZFOjU2REIxRjg6Njk3MDhDMTgiLCJ2aXNpdG9yX2lkIjoiNzk3MTQ1Mzg2NTcxNjM4Njg0MCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | b83d1a47341abf3c897b81396cab22474ba59a62e683608c575a9af08be7f2d4 |
| hovercard-subject-tag | issue:1068484555 |
| 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-python/purescript-python/37/issue_layout |
| twitter:image | https://opengraph.githubassets.com/f83180e85ea5a4e771608b067ac3005ec572adae93d654287339af028e894fae/purescript-python/purescript-python/issues/37 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/f83180e85ea5a4e771608b067ac3005ec572adae93d654287339af028e894fae/purescript-python/purescript-python/issues/37 |
| og:image:alt | Is there another package for the Maybe monad that purescript-python supports? In normal purescript, I run spago install maybe to use the Maybe monad. However, if I try to do that with purescript-py... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | akazukin5151 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 9920a62ba22d06470388e2904804fb7e5ec51c9e35f81784e9191394c74b2bd2 |
| turbo-cache-control | no-preview |
| go-import | github.com/purescript-python/purescript-python git https://github.com/purescript-python/purescript-python.git |
| octolytics-dimension-user_id | 61223985 |
| octolytics-dimension-user_login | purescript-python |
| octolytics-dimension-repository_id | 240700012 |
| octolytics-dimension-repository_nwo | purescript-python/purescript-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 240700012 |
| octolytics-dimension-repository_network_root_nwo | purescript-python/purescript-python |
| 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 | 7d6181066430cc06553c8396ca201e194ae33cb9 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width