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

make new user experience smoother #350

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ will be true in GHC 8.10.1.
## Examples

Make sure you read the [Necessary Language
Extensions](https://github.com/isovector/polysemy#necessary-language-extensions)
Extensions](https://github.com/isovector/polysemy#necessary-language-extensions) and add any extras in example source blocks (such as LambdaCase and BlockArguments below)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really don't understand this sentence, sorry! Can you explain it to me? Mostly, what are the "extras" referring to?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

extras == extra language pragmas

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, but what are they extra in reference to?
Do you mean "add any that are listed in the necessary extensions, but not enabled in the example source block"?

before trying these yourself!

Teletype effect:
Expand Down
5 changes: 4 additions & 1 deletion src/Polysemy/Internal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@ import Polysemy.Internal.Union
-- catching = do
-- modify (++"-catch")
-- get
-- catch @String throwing (\ _ -> catching)
-- -- Without `-fplugin=Polysemy.Plugin` you need `catch @String`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit:
Since these are Haskell comments, maybe the backticks should be @s instead? Not sure if haddock even checks nested comments.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haddock doesn't check these AFAIK

-- catch throwing (\ _ -> catching)
-- :}
--
-- when handling 'Polysemy.Error.Error' first, state is preserved after error
Expand All @@ -113,6 +114,7 @@ import Polysemy.Internal.Union
-- example
-- & runError
-- & fmap (either id id)
-- -- Without `-fplugin=Polysemy.Plugin` you need `evalState @String`
-- & evalState ""
-- & runM
-- & (print =<<)
Expand All @@ -123,6 +125,7 @@ import Polysemy.Internal.Union
--
-- >>> :{
-- example
-- -- Without `-fplugin=Polysemy.Plugin` you need `evalState @String`
-- & evalState ""
-- & runError
-- & fmap (either id id)
Expand Down