Skip to content

extended documentation for catchException #13

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

Closed
wants to merge 1 commit into from

Conversation

robkuz
Copy link

@robkuz robkuz commented Feb 15, 2016

some clarification on the usage of catchException (hopefully)

@@ -71,15 +71,21 @@ main = do
catchException :: forall a eff. (Error -> Eff eff a) -> Eff (err :: EXCEPTION | eff) a -> Eff eff a
```

Catch an exception by providing an exception handler.
Catch an exception by providing an exception handler for the given effectful Monad.
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure if this adds anything, but the use of "Monad" is probably not what you intended. The only monad in use here is Eff (err :: EXCEPTION | eff), so you might say "in the Eff monad" instead. Note, the function arguments are not monads, since only type constructors can be monads, not values.

@paf31
Copy link
Contributor

paf31 commented Feb 16, 2016

For future reference, for documentation updates, please update the source code and run pulp docs, instead of modifying the Markdown files directly.

@robkuz
Copy link
Author

robkuz commented Feb 17, 2016

OK. I will remember the pulp docs thing the next time.
concerning the terminology - I am sure its wrong/not fitting. Much to much of a newbie to get it right yet.
However the gist of my PR was to have an example that a) actually throw an exception and that b) could be easily copied into a file and compiled/run and then can be used as an sandbox for further experiments.

@robkuz robkuz closed this Feb 17, 2016
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 this pull request may close these issues.

2 participants