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

Documentation examples #197

Merged
merged 3 commits into from
Oct 1, 2019
Merged

Documentation examples #197

merged 3 commits into from
Oct 1, 2019

Conversation

chshersh
Copy link
Contributor

Resolves #173

Now all tests are passing (at least on GHC-8.6.5, let's see what's CI will tell).

Cmdv and others added 2 commits September 30, 2019 16:49
* making a start to adding code examples

* make recomended ammends, add descriptions to Relude.File

* do a bunch more examples with questions

* some review ammends

* making more ammends using review comments

* amending compile issues and sugestions
@chshersh chshersh added the doc README, Haddock documentation, tutorials label Sep 30, 2019
@chshersh chshersh self-assigned this Sep 30, 2019
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.

Looks really nice! 👍

@@ -121,19 +121,45 @@ instance StaticMap IntSet where
{-# INLINE lookup #-}
{-# INLINE member #-}
Copy link
Member

Choose a reason for hiding this comment

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

Should we refactor this so that each INLINE would go under the function?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good idea!

@@ -8,6 +8,9 @@ License: MIT
Maintainer: Kowainik <xrom.xkov@gmail.com>

Lifted reexports from 'Data.IORef' module.

Lifted meaning that you can also use them inside various
Copy link
Member

Choose a reason for hiding this comment

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

Let's keep this comment consistent with other identical comments 🙂

hello

"hello
hello"
Copy link
Contributor

Choose a reason for hiding this comment

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

I ended up leaving the " out because in ghci terminal they're not displayed. ¯_(ツ)_/¯

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Maybe this is some strange behaviour of doctest

@@ -26,6 +26,10 @@ import Relude.Monad (MonadIO, liftIO, (<$!>))

import qualified Control.Exception.Base (evaluate)


-- $setup
-- >>> import Relude
Copy link
Contributor

Choose a reason for hiding this comment

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

I couldn't get import Relude to work, would always get:

<no location info>: error:
    Could not load module ‘Relude’
    It is a member of the hidden package ‘relude-0.6.0.0’.
    You can run ‘:set -package relude’ to expose it.
    (Note: this unloads all the modules in the current scope.)

then follow those instructions and I'd get:

<interactive>:1:1: error:
    attempting to use module ‘main:Relude’ (/Users/cmdv/Haskell-OSS/relude/src/Relude.hs) which is not loaded

maybe I have things set up wrong 😄

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, I can see that it's possible to have invalid config and break doctest...

Copy link
Contributor

Choose a reason for hiding this comment

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

yeah not too sure, need to look into it. sorry this was off topic but the PR looks great 🎉

Copy link
Member

Choose a reason for hiding this comment

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

Thanks for your great work @Cmdv and @chshersh 🏆

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.

Great!

@vrom911 vrom911 merged commit cb02810 into master Oct 1, 2019
@vrom911 vrom911 deleted the documentation-examples branch October 1, 2019 06:27
@chshersh chshersh added the Hacktoberfest https://hacktoberfest.digitalocean.com/ label Nov 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc README, Haddock documentation, tutorials Hacktoberfest https://hacktoberfest.digitalocean.com/
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Haddock examples to EVERY function
3 participants