haskell-core / core-libraries-proposals

Proposed changes to Haskell Core Libraries
https://haskell.org
19 stars 3 forks source link
haskell

Core Libraries Proposals

This repository contains specifications for proposed changes to the Haskell Core Libraries <https://wiki.haskell.org/Core_Libraries_Committee#Core_Libraries>_. The purpose of the Libraries proposal process and of the CLC, is to ensure the healthy development of Haskell's core libraries.

What is a core library?

A core library is simply one which is maintained by the Core Libraries Committee, or CLC. For more details on how libraries are determined to be core, and which libraries are currently considered core, see the CLC document <https://wiki.haskell.org/Core_Libraries_Committee#Core_Libraries>_. We encourage you to read that document to better understand the relationship between core libraries and the CLC, as it will make understanding the scope of the Libraries Proposal process simpler.

What is a proposal?

A Libraries Proposal is a document describing a proposed change to the API of a core library. These do not include things like

These do include

Changes to libraries not deemed core are not automatically within the scope of the committee, and can be contributed following the workflow set forth by the respective maintainers of those libraries.

Should a maintainer(s) of a core library deem a change significant or controversial enough to warrant a proposal, they may, at their discretion, involve the CLC and ask the contributor(s) to write a formal proposal.

The life cycle of a proposal

This section outlines what stages a proposal may go through. The stage is identified by a GitHub label, which is identified in the following list.

  1. (No label.) The author drafts a proposal.

    What is a proposal? <#what-is-a-proposal>What should a proposal look like? <#what-should-a-proposal-look-like>

  2. (No label.) The author submits the proposal to the wider Haskell community for discussion, as a pull request against this repository.

    How to submit a proposal <#how-to-start-a-new-proposal>_

  3. (No label.) The wider community discusses the proposal in the comment section of the pull request, while the author refines the proposal. This phase lasts as long as necessary.

    Discussion goals <#discussion-goals>How to comment on a proposal <#how-to-comment-on-a-proposal>≡ List of proposals under discussion <https://github.com/haskell-core/core-libraries-proposals/pulls?q=is%3Aopen+is%3Apr+no%3Alabel>_

  4. Label: Pending shepherd recommendation <https://github.com/haskell-core/core-libraries-proposals/pulls?q=is%3Aopen+is%3Apr+label%3A%22Pending+shepherd+recommendation%22>_. Eventually the proposal author brings the proposal before the committee for review.

    How to bring a proposal before the committee <#how-to-bring-a-proposal-before-the-committee>Who is the committee? <#who-is-the-committee>≡ List of proposals waiting for shepherd <https://github.com/haskell-core/core-libraries-proposals/pulls?q=is%3Aopen+is%3Apr+label%3A%22Pending+shepherd+recommendation%22>_ •

  5. Label: Pending committee review <https://github.com/haskell-core/core-libraries-proposals/pulls?q=is%3Aopen+is%3Apr+label%3A%22Pending+committee+review%22>_. One committee member steps up as a shepherd, and generates consensus within the committee within four or five weeks.

    Committee process <#committee-process>Review criteria <#review-criteria>≡ List of proposals under review <https://github.com/haskell-core/core-libraries-proposals/pulls?q=is%3Aopen+is%3Apr+label%3A%22Pending+committee+review%22>_

  6. Eventually, the committee rejects a proposal (label: Rejected), or passes it back to the author for review (label: Needs revision <https://github.com/haskell-core/core-libraries-proposals/pulls?q=label%3A%22Needs+revision%22>), or accepts it (label: Accepted <https://github.com/haskell-core/core-libraries-proposals/pulls?q=label%3A%22Accepted%22>).

    Acceptance of the proposal implies that the implementation will be accepted into the library, provided it is well-engineered, well-documented, and does not complicate the code-base too much.

    ≡ List of accepted proposals <https://github.com/haskell-core/core-libraries-proposals/tree/master/proposals>≡ List of proposals being revised <https://github.com/haskell-core/core-libraries-proposals/pulls?q=label%3A%22Needs+revision%22>≡ List of rejected proposals <https://github.com/haskell-core/core-libraries-proposals/pulls?q=label%3A%Rejected%22>_

  7. Label: Dormant <https://github.com/haskell-core/core-libraries-proposals/pulls?q=is%3Aopen+is%3Apr+label%3A%22Dormant>_. If a proposal sees no activity for along time, it is marked as “dormant”, and eventually closed.

    What is a dormant proposal? <#what-is-a-dormant-proposal>≡ List of dormant proposals <https://github.com/haskell-core/core-libraries-proposals/pulls?q=is%3Apr+label%3A%22dormant%22>

  8. Label: Implemented <https://github.com/haskell-core/core-libraries-proposals/pulls?q=is%3Apr+label%3A%22Implemented%22>_. Once a proposal is accepted, it still has to be implemented. The author may do that, or someone else. We mark the proposal as “implemented” once it hits the library’s master branch (and we are happy to be nudged to do so by email or GitHub issue).

    ≡ List of implemented proposals <https://github.com/haskell-core/core-libraries-proposals/pulls?q=is%3Apr+label%3A%22Implemented%22>_

Do not hesitate to contact <#questions>_ us if you have questions.

How to start a new proposal

Proposals are written in either ReStructuredText <http://www.sphinx-doc.org/en/stable/rest.html> or Markdown <https://github.github.com/gfm/>. The proposal process itself has no preference, so proposal authors are free to write in whichever they please.

Proposals should follow the structure given in the ReStructuredText template <https://github.com/haskell-core/core-libraries-proposals/blob/master/proposals/0000-template.rst>, or the Markdown template <https://github.com/haskell-core/core-libraries-proposals/blob/master/proposals/0000-template.md>. (The two are identical except for format.)

See the section Review criteria <#review-criteria>_ below for more information about what makes a strong proposal, and how it will be reviewed.

To start a proposal, create a pull request that adds your proposal as proposals/0000-proposal-name.rst or proposals/0000-proposal-name.md. Use the corresponding proposals/0000-template file as a template.

If you are unfamiliar with git and github, you can use the GitHub web interface to perform these steps:

  1. Load the proposal template using this link (ReStructuredText) or this link (Markdown).
  2. Change the filename and edit the proposal.
  3. Press “Commit new file”

_ https://github.com/haskell-core/core-libraries-proposals/new/master?filename=proposals/new-proposal.rst;message=Start%20new%20proposal;value=Notes%20on%20reStructuredText%20-%20delete%20this%20section%20before%20submitting%0A%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%0A%0AThe%20proposals%20are%20submitted%20in%20reStructuredText%20format.%20%20To%20get%20inline%20code%2C%20enclose%20text%20in%20double%20backticks%2C%20%60%60like%20this%60%60.%20%20To%20get%20block%20code%2C%20use%20a%20double%20colon%20and%20indent%20by%20at%20least%20one%20space%0A%0A%3A%3A%0A%0A%20like%20this%0A%20and%0A%0A%20this%20too%0A%0ATo%20get%20hyperlinks%2C%20use%20backticks%2C%20angle%20brackets%2C%20and%20an%20underscore%20%60like%20this%20%3Chttp%3A//www.haskell.org/%3E%60.%0A%0A%0AProposal%20title%0A%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%0A%0A..%20author%3A%3A%20Your%20name%0A..%20date-accepted%3A%3A%20Leave%20blank.%20This%20will%20be%20filled%20in%20when%20the%20proposal%20is%20accepted.%0A..%20proposal-number%3A%3A%20Leave%20blank.%20This%20will%20be%20filled%20in%20when%20the%20proposal%20is%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20accepted.%0A..%20ticket-url%3A%3A%20Leave%20blank.%20This%20will%20eventually%20be%20filled%20with%20the%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20ticket%20URL%20which%20will%20track%20the%20progress%20of%20the%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20implementation%20of%20the%20feature.%0A..%20implemented%3A%3A%20Leave%20blank.%20This%20will%20be%20filled%20in%20with%20the%20first%20GHC%20version%20which%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20implements%20the%20described%20feature.%0A..%20highlight%3A%3A%20haskell%0A..%20header%3A%3A%20This%20proposal%20is%20%60discussed%20at%20this%20pull%20request%20%3Chttps%3A//github.com/haskell-core/core-libraries-proposals/pull/0%3E%60_.%0A%20%20%20%20%20%20%20%20%20%20%20%20%2A%2AAfter%20creating%20the%20pull%20request%2C%20edit%20this%20file%20again%2C%20update%20the%0A%20%20%20%20%20%20%20%20%20%20%20%20number%20in%20the%20link%2C%20and%20delete%20this%20bold%20sentence.%2A%2A%0A..%20sectnum%3A%3A%0A..%20contents%3A%3A%0A%0AHere%20you%20should%20write%20a%20short%20abstract%20motivating%20and%20briefly%20summarizing%20the%20proposed%20change.%0A%0A%0AMotivation%0A----------%0AGive%20a%20strong%20reason%20for%20why%20the%20community%20needs%20this%20change.%20Describe%20the%20use%0Acase%20as%20clearly%20as%20possible%20and%20give%20an%20example.%20Explain%20how%20the%20status%20quo%20is%0Ainsufficient%20or%20not%20ideal.%0A%0AA%20good%20Motivation%20section%20is%20often%20driven%20by%20examples%20and%20real-world%20scenarios.%0A%0A%0AProposed%20Change%20Specification%0A-----------------------------%0ASpecify%20the%20change%20in%20precise%2C%20comprehensive%20yet%20concise%20language.%20Avoid%20words%0Alike%20%22should%22%20or%20%22could%22.%20Strive%20for%20a%20complete%20definition.%20Your%20specification%0Amay%20include%2C%0A%0A%2A%20grammar%20and%20semantics%20of%20any%20new%20syntactic%20constructs%0A%2A%20the%20types%20and%20semantics%20of%20any%20new%20library%20interfaces%0A%2A%20how%20the%20proposed%20change%20interacts%20with%20existing%20language%20or%20compiler%0A%20%20features%2C%20in%20case%20that%20is%20otherwise%20ambiguous%0A%0ANote%2C%20however%2C%20that%20this%20section%20need%20not%20describe%20details%20of%20the%0Aimplementation%20of%20the%20feature%20or%20examples.%20The%20proposal%20is%20merely%20supposed%20to%0Agive%20a%20conceptual%20specification%20of%20the%20new%20feature%20and%20its%20behavior.%0A%0AExamples%0A--------%0AThis%20section%20illustrates%20the%20specification%20through%20the%20use%20of%20examples%20of%20the%0Alanguage%20change%20proposed.%20It%20is%20best%20to%20exemplify%20each%20point%20made%20in%20the%0Aspecification%2C%20though%20perhaps%20one%20example%20can%20cover%20several%20points.%20Contrived%0Aexamples%20are%20OK%20here.%20If%20the%20Motivation%20section%20describes%20something%20that%20is%0Ahard%20to%20do%20without%20this%20proposal%2C%20this%20is%20a%20good%20place%20to%20show%20how%20easy%20that%0Athing%20is%20to%20do%20with%20the%20proposal.%0A%0AEffect%20and%20Interactions%0A-----------------------%0ADetail%20how%20the%20proposed%20change%20addresses%20the%20original%20problem%20raised%20in%20the%0Amotivation.%0A%0ADiscuss%20possibly%20contentious%20interactions%20with%20existing%20language%20or%20compiler%0Afeatures.%0A%0A%0ACosts%20and%20Drawbacks%0A-------------------%0AGive%20an%20estimate%20on%20development%20and%20maintenance%20costs.%20List%20how%20this%20effects%0Alearnability%20of%20the%20language%20for%20novice%20users.%20Define%20and%20list%20any%20remaining%0Adrawbacks%20that%20cannot%20be%20resolved.%0A%0A%0AAlternatives%0A------------%0AList%20existing%20alternatives%20to%20your%20proposed%20change%20as%20they%20currently%20exist%20and%0Adiscuss%20why%20they%20are%20insufficient.%0A%0A%0AUnresolved%20Questions%0A--------------------%0AExplicitly%20list%20any%20remaining%20issues%20that%20remain%20in%20the%20conceptual%20design%20and%0Aspecification.%20Be%20upfront%20and%20trust%20that%20the%20community%20will%20help.%20Please%20do%0Anot%20list%20%2Aimplementation%2A%20issues.%0A%0AHopefully%20this%20section%20will%20be%20empty%20by%20the%20time%20the%20proposal%20is%20brought%20to%0Athe%20steering%20committee.%0A%0A%0AImplementation%20Plan%0A-------------------%0A%28Optional%29%20If%20accepted%20who%20will%20implement%20the%20change%3F%20Which%20other%20resources%0Aand%20prerequisites%20are%20required%20for%20implementation%3F%0A

.. link generated with python -c "import urllib;print 'https://github.com/haskell-core/core-libraries-proposals/new/master?filename=proposals/new-proposal.rst;message=%s;value=%s' % (urllib.quote('Start new proposal'), urllib.quote(file('proposals/0000-template.rst').read()))"

__ https://github.com/haskell-core/core-libraries-proposals/new/master?filename=proposals/new-proposal.md;message=Start%20new%20proposal;value=---%0Aauthor%3A%20Your%20name%0Adate-accepted%3A%20%22%22%0Aproposal-number%3A%20%22%22%0Aticket-url%3A%20%22%22%0Aimplemented%3A%20%22%22%0A---%0A%0AThis%20proposal%20is%20%5Bdiscussed%20at%20this%20pull%20request%5D%28https%3A//github.com/haskell-core/core-libraries-proposals/pull/0%3E%29.%0A%2A%2AAfter%20creating%20the%20pull%20request%2C%20edit%20this%20file%20again%2C%20update%20the%20number%20in%0Athe%20link%2C%20and%20delete%20this%20bold%20sentence.%2A%2A%0A%0A%23%20Proposal%20title%0A%0AHere%20you%20should%20write%20a%20short%20abstract%20motivating%20and%20briefly%20summarizing%20the%0Aproposed%20change.%0A%0A%0A%23%23%20Motivation%0A%0AGive%20a%20strong%20reason%20for%20why%20the%20community%20needs%20this%20change.%20Describe%20the%20use%0Acase%20as%20clearly%20as%20possible%20and%20give%20an%20example.%20Explain%20how%20the%20status%20quo%20is%0Ainsufficient%20or%20not%20ideal.%0A%0AA%20good%20Motivation%20section%20is%20often%20driven%20by%20examples%20and%20real-world%20scenarios.%0A%0A%0A%23%23%20Proposed%20Change%20Specification%0A%0ASpecify%20the%20change%20in%20precise%2C%20comprehensive%20yet%20concise%20language.%20Avoid%20words%0Alike%20%22should%22%20or%20%22could%22.%20Strive%20for%20a%20complete%20definition.%20Your%20specification%0Amay%20include%2C%0A%0A%2A%20grammar%20and%20semantics%20of%20any%20new%20syntactic%20constructs%0A%2A%20the%20types%20and%20semantics%20of%20any%20new%20library%20interfaces%0A%2A%20how%20the%20proposed%20change%20interacts%20with%20existing%20language%20or%20compiler%0A%20%20features%2C%20in%20case%20that%20is%20otherwise%20ambiguous%0A%0ANote%2C%20however%2C%20that%20this%20section%20need%20not%20describe%20details%20of%20the%0Aimplementation%20of%20the%20feature%20or%20examples.%20The%20proposal%20is%20merely%20supposed%20to%0Agive%20a%20conceptual%20specification%20of%20the%20new%20feature%20and%20its%20behavior.%0A%0A%23%23%20Examples%0A%0AThis%20section%20illustrates%20the%20specification%20through%20the%20use%20of%20examples%20of%20the%0Alanguage%20change%20proposed.%20It%20is%20best%20to%20exemplify%20each%20point%20made%20in%20the%0Aspecification%2C%20though%20perhaps%20one%20example%20can%20cover%20several%20points.%20Contrived%0Aexamples%20are%20OK%20here.%20If%20the%20Motivation%20section%20describes%20something%20that%20is%0Ahard%20to%20do%20without%20this%20proposal%2C%20this%20is%20a%20good%20place%20to%20show%20how%20easy%20that%0Athing%20is%20to%20do%20with%20the%20proposal.%0A%0A%23%23%20Effect%20and%20Interactions%0A%0ADetail%20how%20the%20proposed%20change%20addresses%20the%20original%20problem%20raised%20in%20the%0Amotivation.%0A%0ADiscuss%20possibly%20contentious%20interactions%20with%20existing%20language%20or%20compiler%0Afeatures.%0A%0A%0A%23%23%20Costs%20and%20Drawbacks%0A%0AGive%20an%20estimate%20on%20development%20and%20maintenance%20costs.%20List%20how%20this%20effects%0Alearnability%20of%20the%20language%20for%20novice%20users.%20Define%20and%20list%20any%20remaining%0Adrawbacks%20that%20cannot%20be%20resolved.%0A%0A%0A%23%23%20Alternatives%0A%0AList%20existing%20alternatives%20to%20your%20proposed%20change%20as%20they%20currently%20exist%20and%0Adiscuss%20why%20they%20are%20insufficient.%0A%0A%0A%23%23%20Unresolved%20Questions%0A%0AExplicitly%20list%20any%20remaining%20issues%20that%20remain%20in%20the%20conceptual%20design%20and%0Aspecification.%20Be%20upfront%20and%20trust%20that%20the%20community%20will%20help.%20Please%20do%0Anot%20list%20%2Aimplementation%2A%20issues.%0A%0AHopefully%20this%20section%20will%20be%20empty%20by%20the%20time%20the%20proposal%20is%20brought%20to%0Athe%20steering%20committee.%0A%0A%0A%23%23%20Implementation%20Plan%0A%0A%28Optional%29%20If%20accepted%20who%20will%20implement%20the%20change%3F%20Which%20other%20resources%0Aand%20prerequisites%20are%20required%20for%20implementation%3F%0A%0A

.. link generated with python -c "import urllib;print 'https://github.com/haskell-core/core-libraries-proposals/new/master?filename=proposals/new-proposal.md;message=%s;value=%s' % (urllib.quote('Start new proposal'), urllib.quote(file('proposals/0000-template.md').read()))"

The pull request summary should include a brief description of your proposal, along with a link to the rendered view of proposal document in your branch. For instance,

.. code-block:: md

This is a proposal aiming to unify `Nat` and `Natural`.

[Rendered](https://github.com/chessai/core-libraries-proposals/blob/typeable/proposals/0000-type-indexed-typeable.rst)

How to amend an accepted proposal

Some proposals amend an existing proposal. Such an amendment:

Often, this happens after a proposal is accepted, but before or while it is implemented. In these cases, a PR that changes the accepted proposal can be opened. It goes through the same process as an original proposal.

Discussion goals

Members of the Haskell community are warmly invited to offer feedback on proposals. Feedback ensures that a variety of perspectives are heard, that alternative designs are considered, and that all of the pros and cons of a design are uncovered. Feedback by the maintainers of the library is highly encouraged. We particularly encourage the following types of feedback,

How to comment on a proposal

To comment on a proposal you need to be viewing the proposal's diff in "source diff" view. To switch to this view use the buttons on the top-right corner of the Files Changed tab.

.. figure:: rich-diff.png :alt: The view selector buttons. :align: right

Use the view selector buttons on the top right corner of the "Files
Changed" tab to change between "source diff" and "rich diff" views.

Feedback on a open pull requests can be offered using both GitHub's in-line and pull request commenting features. Inline comments can be added by hovering over a line of the diff.

.. figure:: inline-comment.png :alt: The + button appears while hovering over line in the source diff view. :align: right

Hover over a line in the source diff view of a pull request and
click on the ``+`` to leave an inline comment

For the maintenance of general sanity, try to avoid leaving "me too" comments. If you would like to register your approval or disapproval of a particular comment or proposal, feel free to use GitHub's "Reactions" feature <https://help.github.com/articles/about-discussions-in-issues-and-pull-requests>_.

How to bring a proposal before the committee

When the discussion has ebbed down and the author thinks the proposal is ready, they

  1. Review the discussion thread and ensure that the proposal text accounts for all salient points. Remember, the proposal must stand by itself, and be understandable without reading the discussion thread.
  2. Add a comment to the a pull request, briefly summarizing the major points raised during the discussion period and stating your belief that the proposal is ready for review. In this comment, tag the committee secretary (currently @chessai).

The secretary <#who-is-the-committee> will then label the pull request with Pending shepherd recommendation and start the committee process <#committee-process>. (If this does not happen within a day or two, please ping the secretary or the committee.)

What is a dormant proposal?

In order to keep better track of actively discussed proposals, proposals that see no activity for an extended period of time (a month or two) might be marked as “dormant”. At any time the proposer, or someone else can revive the proposal by picking up the discussion (and possibly asking the secretary <#who-is-the-committee>_ to remove the dormant tag).

You can see the list of dormant proposals <https://github.com/haskell-core/core-libraries-proposals/pulls?q=is%3Aopen+is%3Apr+label%3A%22dormant%22>_.

Who is the committee?

You can reach the committee by email at core-libraries-committee@haskell.org.

The current members, including their GitHub handle, when they joined and their role, are listed at:

====================== ==================================================== ======= ================ chessai @chessai <https://github.com/chessai> 2020/09 chair, secretary Cale Gibbard @cgibbard <https://github.com/cgibbard> 2020/09 Edward Kmett @ekmett <https://github.com/ekmett> 2020/09 Andrew Thaddeus Martin @andrewthad <https://github.com/andrewthad> 2020/09 Eric Mertens @glguy <https://github.com/glguy> 2020/09 Neil Mitchell @ndmitchell <https://github.com/ndmitchell> 2020/09 Emily Pillmore @emilypi <https://github.com/emilypi> 2020/09 Herbert Valerio Riedel @hvr <https://github.com/hvr> 2020/09 George Wilson @gwils <https://github.com/gwils>_ 2020/09 ====================== ==================================================== ======= ================

Committee process

The committee process starts once the secretary has been notified that a proposal is ready for decision.

The steps below have timescales attached, so that everyone shares the same expectations. But they are only reasonable expectations. The committee consists of volunteers with day jobs, who are reviewing proposals in their spare time. If they do not meet the timescales indicated below (e.g., they might be on holiday), a reasonable response is a polite ping/enquiry.

Review criteria

Here are some characteristics that a good proposal should have.

Below are some criteria that the committee and the supporting Haskell community will generally use to evaluate a proposal. These criteria are guidelines and questions that the committee will consider. None of these criteria is an absolute bar: it is the committee's job to weigh them, and any other relevant considerations, appropriately.

How to build the proposals?

The proposals can be rendered by running::

nix-shell shell.nix --run "make html"

this will then create a directory _build which will contain an index.html file and the other rendered proposals. This is useful when developing a proposal to ensure that your file is syntax correct.

Questions?

Feel free to contact any of the members of the Core Libraries Committee <#who-is-the-committee>_ with questions. Email <https://wiki.haskell.org/Mailing_lists>_ is a good way of accomplishing this.