Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

example of do notation? #6

Open
cakekindel opened this issue Mar 18, 2021 · 1 comment · May be fixed by #7
Open

example of do notation? #6

cakekindel opened this issue Mar 18, 2021 · 1 comment · May be fixed by #7

Comments

@cakekindel
Copy link
Contributor

Hi again, I'm having issues with the way do notation is compiled as tests, wondering if this is an issue or if there's something i could be doing differently

--| ```purescript run
--| > import Effect.Unsafe (unsafePerformEffect)
--| > import Effect.Console (log)
--| > unsafePerformEffect $ do
--|                           log "help!"
--|                           mempty
--| unit
--| ```
foo = "bar"

compiles to invalid test code:

main :: Spec Unit
main = describe "Test.DocTest.Effect.Worker" $ do
    it "value spec in docs from: sendMsg" $ show (unsafePerformEffect $ do log "help!"
                             mempty) `shouldEqual` "unit"

    pure unit
@csicar
Copy link
Owner

csicar commented Mar 18, 2021

That's interesting: That's actually a bug in the purescript pretty printer: https://hackage.haskell.org/package/purescript-0.13.8/docs/src/Language.PureScript.Pretty.Values.html#prettyPrintValue

I'll try to get that fixed

@csicar csicar linked a pull request Mar 18, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants