Skip to content

Add clearer docs for Prelude module #270

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

Merged
merged 2 commits into from
Sep 19, 2021
Merged
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Bugfixes:

Other improvements:
- Changed `unit`'s FFI representation from `{}` to `undefined` (#267 by @JordanMartinez)
- Added clearer docs for Prelude module (#270 by @JordanMartinez)
- Clarify docs for `flip` (#271 by @JordanMartinez)

## [v5.0.1](https://github.com/purescript/purescript-prelude/releases/tag/v5.0.1) - 2021-05-11
Expand Down
12 changes: 12 additions & 0 deletions src/Prelude.purs
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
-- | `Prelude` is a module that re-exports many other foundational modules from the `purescript-prelude` library
-- | (e.g. the Monad type class hierarchy, the Monoid type classes, Eq, Ord, etc.).
-- |
-- | Typically, this module will be imported in most other libraries and projects as an open import.
-- |
-- | ```
-- | module MyModule where
-- |
-- | import Prelude -- open import
-- |
-- | import Data.Maybe (Maybe(..)) -- closed import
Copy link
Member

Choose a reason for hiding this comment

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

I’m not sure we need to describe this as a closed import, or comment next to the Prelude import as an open one, but I don’t feel too strongly about it

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If the 'open import' comment confuses people, we can see how to edit this later. For now, I think it does more good than harm.

-- | ```
module Prelude
( module Control.Applicative
, module Control.Apply
Expand Down