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

Document the effects and their carriers. #251

Merged
merged 77 commits into from
Oct 10, 2019
Merged

Document the effects and their carriers. #251

merged 77 commits into from
Oct 10, 2019

Conversation

patrickt
Copy link
Collaborator

@patrickt patrickt commented Oct 6, 2019

#240 mentioned, very correctly, that our documentation was a little sparse, and that’s a problem that only grew worse with the various reorganizations on the road to 1.0. This patch remedies that.

Fixes #244.

@patrickt patrickt requested a review from robrix October 7, 2019 18:06
Copy link
Contributor

@robrix robrix left a comment

Choose a reason for hiding this comment

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

This is looking good! A bunch more notes but it’s shaping up really nicely.

src/Control/Carrier/Cull/Church.hs Outdated Show resolved Hide resolved
src/Control/Carrier/Empty/Maybe.hs Outdated Show resolved Hide resolved
src/Control/Carrier/Error/Either.hs Outdated Show resolved Hide resolved
src/Control/Carrier/NonDet/Maybe.hs Outdated Show resolved Hide resolved
src/Control/Carrier/Trace/Printing.hs Outdated Show resolved Hide resolved
src/Control/Effect/NonDet.hs Outdated Show resolved Hide resolved
src/Control/Effect/Reader.hs Outdated Show resolved Hide resolved
src/Control/Effect/Reader.hs Outdated Show resolved Hide resolved
src/Control/Effect/Writer.hs Outdated Show resolved Hide resolved
src/Control/Effect/Writer.hs Outdated Show resolved Hide resolved
patrickt and others added 18 commits October 9, 2019 18:13
Co-Authored-By: Rob Rix <robrix@github.com>
Co-Authored-By: Rob Rix <robrix@github.com>
Co-Authored-By: Rob Rix <robrix@github.com>
Co-Authored-By: Rob Rix <robrix@github.com>
Co-Authored-By: Rob Rix <robrix@github.com>
Co-Authored-By: Rob Rix <robrix@github.com>
Co-Authored-By: Rob Rix <robrix@github.com>
Co-Authored-By: Rob Rix <robrix@github.com>
Co-Authored-By: Rob Rix <robrix@github.com>
Co-Authored-By: Rob Rix <robrix@github.com>
Co-Authored-By: Rob Rix <robrix@github.com>
Co-Authored-By: Rob Rix <robrix@github.com>
@patrickt patrickt requested a review from robrix October 9, 2019 22:39
Copy link
Contributor

@robrix robrix left a comment

Choose a reason for hiding this comment

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

Good stuff 👍 just a couple more notes, then let’s merge 🎉

@@ -1,4 +1,6 @@
{-# LANGUAGE DefaultSignatures, EmptyCase, FlexibleContexts, FlexibleInstances, MultiParamTypeClasses, RankNTypes, TypeOperators #-}

-- | Provides the 'HFunctor' and 'Effect' classes that an effect type implements so that a carrier monad can provide an instance of 'Carrier' for that type.
Copy link
Contributor

Choose a reason for hiding this comment

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

Carrier isn’t in scope here, and IMO we don’t need to mention it.

src/Control/Effect/NonDet.hs Outdated Show resolved Hide resolved
Comment on lines 35 to 37
-- Note that the type parameters in the @err a@ paramater and @m a@ parameter must match
-- up; this is so that the calling context knows what type of value this computation
-- expected in the success case.
Copy link
Contributor

Choose a reason for hiding this comment

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

  1. Suggest: “…; this indicates the type that the error must be resumed with.”

  2. Soft wrap, please 🙏

patrickt and others added 2 commits October 10, 2019 16:27
@patrickt patrickt merged commit a964d65 into master Oct 10, 2019
@patrickt patrickt deleted the docs-pass branch October 10, 2019 22:01
@robrix robrix mentioned this pull request Oct 27, 2019
2 tasks
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.

We should document valid carriers in the effect modules
2 participants