Skip to content

Commit 161aaf7

Browse files
phadejhvr
authored andcommitted
Import changes from wiki
1 parent 0d4ab50 commit 161aaf7

1 file changed

Lines changed: 20 additions & 19 deletions

File tree

‎README.md‎

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -33,21 +33,20 @@ the first three components *A-C*, the other components can be used in
3333
any way the package maintainer sees fit.
3434

3535
Version number ordering is already defined by Cabal as the lexicographic
36-
ordering of the components. For example, 2.1 \> 1.3, and 2.1.1 \> 2.1.
37-
(The `Data.Version.Version` type and its `Ord` instance embody this
38-
ordering).
36+
ordering of the components. For example, 2.0.1 \> 1.3.2, and 2.0.1.0 \> 2.0.1.
37+
(The `Data.Version.Version` type and its `Ord` instance embody this ordering).
3938

4039
*A.B* is known as the *major* version number, and *C* the *minor*
4140
version number. When a package is updated, the following rules govern
4241
how the version number must change relative to the previous version:
4342

4443
1. If any entity was removed, or the types of any entities or the
45-
definitions of datatypes or classes were changed, or orphan
46-
instances were added or any instances were removed, then the new
47-
*A.B* must be greater than the previous *A.B*. Note that modifying
48-
imports or depending on a newer version of another package may cause
49-
extra orphan instances to be exported and thus force a major version
50-
change.
44+
definitions of datatypes or classes were changed, or [orphan
45+
instances](https://wiki.haskell.org/Orphan_instance) were added or any
46+
instances were removed, then the new *A.B* must be greater than the previous
47+
*A.B*. Note that modifying imports or depending on a newer version of another
48+
package may cause extra orphan instances to be exported and thus force a major
49+
version change.
5150
2. Otherwise, if only new bindings, types, classes, non-orphan
5251
instances or modules (but see below) were added to the interface,
5352
then *A.B* may remain the same but the new *C* must be greater than
@@ -65,7 +64,7 @@ a particular *A.B.C* and be sure of getting that API only. For example,
6564
Often a package maintainer wants to add to an API without breaking
6665
backwards compatibility, and in that case they can follow the rules of
6766
point 2, and increase only *C*. A client can specify that they are
68-
[insensitive to additions to the API](Import modules properly "wikilink")
67+
[insensitive to additions to the API](https://wiki.haskell.org/Import_modules_properly)
6968
by allowing a range of *C* values, e.g. `build-depends: base >= 2.1.1 && < 2.2`.
7069

7170
If a package defines an orphan instance, it must depend on the minor
@@ -75,9 +74,10 @@ be backwards compatible. For example,
7574

7675
### Deprecation
7776

78-
Deprecated entities (via a `DEPRECATED` pragma) should probably be
79-
counted as removed for the purposes of upgrading the API, because
80-
packages that use `-Werror` will be broken by the deprecation.
77+
Deprecated entities (via [a `DEPRECATED`
78+
pragma](https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/glasgow_exts.html#warning-and-deprecated-pragmas))
79+
should probably be counted as removed for the purposes of upgrading the API,
80+
because packages that use `-Werror` will be broken by the deprecation.
8181

8282
### Adding new modules
8383

@@ -186,7 +186,7 @@ risky: when a package exports more things than before, there is a chance
186186
that your code will fail to compile due to new name-clash errors. The
187187
risk from new name clashes may be small, but you are on the safe side if
188188
you
189-
[import identifiers explicitly or using qualification](Import modules properly "wikilink").
189+
[import identifiers explicitly or using qualification](https://wiki.haskell.org/Import_modules_properly).
190190

191191
Version syntax
192192
--------------
@@ -205,13 +205,14 @@ Tools
205205
- [precis](http://hackage.haskell.org/package/precis) - a simple tool
206206
for a first approximation of package API differences, see the
207207
[announcement](http://www.haskell.org/pipermail/haskell-cafe/2010-April/077023.html)
208-
- is a program that checks for consistency between package
208+
- [check-pvp](http://hackage.haskell.org/package/check-pvp) is a program that checks for consistency between package
209209
dependencies and import style.
210210

211211
Related
212212
-------
213213

214-
- [Sven Moritz Hallberg](Sven Moritz Hallberg "wikilink"),
215-
"[Eternal compatibility in theory](The_Monad.Reader/Issue2/EternalCompatibilityInTheory "wikilink"),"
216-
[The Monad.Reader](The Monad.Reader "wikilink"),
217-
[Issue 2](The Monad.Reader/Issue2 "wikilink")
214+
- Sven Moritz Hallberg,
215+
"[Eternal compatibility in theory](https://wiki.haskell.org/The_Monad.Reader/Issue2/EternalCompatibilityInTheory),"
216+
[The Monad.Reader](https://wiki.haskell.org/The_Monad.Reader),
217+
[Issue 2](https://wiki.haskell.org/The_Monad.Reader/Issue2)
218+
- [Semantic Versioning](http://semver.org/) is similar, but allows for version tags and defines how tags affect the ordering.

0 commit comments

Comments
 (0)