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

[#54] Improve documentation #57

Merged
merged 2 commits into from
Aug 16, 2018
Merged

[#54] Improve documentation #57

merged 2 commits into from
Aug 16, 2018

Conversation

chshersh
Copy link
Contributor

Resolves #54

See CHANGELOG.md for list of changes. Some of them are breaking. But that's okay, since we're going to release new major version anyways.

@chshersh chshersh added remove doc README, Haddock documentation, tutorials reexport Reexport something new tests labels Aug 15, 2018
@chshersh chshersh added this to the v0.2.0: More improvements milestone Aug 15, 2018
@chshersh chshersh self-assigned this Aug 15, 2018
@@ -53,6 +54,7 @@ bug e = impureThrow (Bug (E.toException e) callStack)
writing something like this:

@
isNonCriticalExc :: Exception e => e -> Bool
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, shit, it should have SomeException -> Bool type

README.md Outdated
@@ -208,7 +208,11 @@ We also have `data Undefined = Undefined` (which, too, comes with warnings).

### Exceptions

TODO: write about reexports, `Bug` and `Exc` pattern.
`relude` reexports `Exception` type from `base` package and introduces `bug`
Copy link
Member

Choose a reason for hiding this comment

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

I would add the before base and bug

README.md Outdated
@@ -208,7 +208,11 @@ We also have `data Undefined = Undefined` (which, too, comes with warnings).

### Exceptions

TODO: write about reexports, `Bug` and `Exc` pattern.
`relude` reexports `Exception` type from `base` package and introduces `bug`
function as an alternative to `error`. There's also very convenient `Exc`
Copy link
Member

Choose a reason for hiding this comment

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

a very

import GHC.Enum (Bounded (..), Enum (..), boundedEnumFrom, boundedEnumFromThen)
import GHC.Float (Double (..), Float (..), Floating (acos, acosh, asin, asinh, atan, atanh, cos, cosh, exp, logBase, pi, sin, sinh, sqrt, tan, tanh, (**)))
import GHC.Generics (Generic)
import GHC.Num (Integer, Num (..), subtract)
import GHC.Real hiding (showSigned, (%))
import GHC.Real (Fractional (..), Integral (..), Ratio, Rational, Real (..), RealFrac (..), even,
fromIntegral, gcd, lcm, odd, realToFrac, (^), (^^))
Copy link
Member

Choose a reason for hiding this comment

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

What about denominator and numerator?

@@ -26,7 +35,12 @@ import qualified Data.Map.Strict as M
universe :: (Bounded a, Enum a) => [a]
universe = [minBound .. maxBound]

{- | Creates a function that is the inverse of a given function @f@.
{- | @inverseMap f@ creates a function that is the inverse of a given function
@f@. It does so by constructing 'M.Map' for every value @f a@. Implementation
Copy link
Member

Choose a reason for hiding this comment

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

The implementation

License: MIT
Maintainer: Kowainik <xrom.xkov@gmail.com>

Polymorphic grouping functions.
Copy link
Member

Choose a reason for hiding this comment

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

This is redundant.

src/Relude.hs Outdated
meaning or __theme__. Name of the module should give you hints regarding what
this module contains. Some /themes/ contain a great amount of both reexported
meaning or __category__. Name of the module should give you hints regarding what
this module contains. Some /categories/ contain a great amount of both reexported
functions and functions of our own. To make it easier to understand these huge
Copy link
Member

Choose a reason for hiding this comment

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

huge -> enormous

src/Relude.hs Outdated
meaning or __theme__. Name of the module should give you hints regarding what
this module contains. Some /themes/ contain a great amount of both reexported
meaning or __category__. Name of the module should give you hints regarding what
this module contains. Some /categories/ contain a great amount of both reexported
functions and functions of our own. To make it easier to understand these huge
chunks of functions, all reexported stuff is moved into separate module with
Copy link
Member

Choose a reason for hiding this comment

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

the separate


-- | This module contains monadic predicates.
This module contains monadic boolean combinators.
Copy link
Member

Choose a reason for hiding this comment

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

just "Monadic boolean combinators"

-- | Functions for debugging. If you left these functions in your code
-- then warning is generated to remind you about left usages. Also some
-- functions (and data types) are convenient for prototyping.
Functions for debugging. If you left these functions in your code then warning
Copy link
Member

Choose a reason for hiding this comment

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

a warning

_ -> "<unknown>"

{- | This function returns the name of its caller of the caller function, but it
requires that the caller function and caller of the caller function has
Copy link
Member

Choose a reason for hiding this comment

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

has -> have

@@ -7,7 +7,7 @@ Copyright: (c) 2016 Stephen Diehl
License: MIT
Maintainer: Kowainik <xrom.xkov@gmail.com>

This module reexports functinons to work with list and 'NonEmpty'.
Reexports most of the "Data.List" and "Data.List.NonEmpty".
Copy link
Member

Choose a reason for hiding this comment

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

Are these "" are intentional?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@vrom911 yes, they give links to modules. In Haddock we need to use single quotes to link to function or types and double quotes to link to modules.

Copy link
Member

@vrom911 vrom911 left a comment

Choose a reason for hiding this comment

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

That's a huge work!

@vrom911 vrom911 merged commit 11849dd into master Aug 16, 2018
@vrom911 vrom911 deleted the chshersh/54-docs branch August 16, 2018 04:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc README, Haddock documentation, tutorials reexport Reexport something new remove tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants