packages feed

no-recursion 0.1.2.0 → 0.1.2.2

raw patch · 6 files changed

+194/−74 lines, 6 filesdep ~doctestPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: doctest

API changes (from Hackage documentation)

Files

+ CHANGELOG.md view
@@ -0,0 +1,49 @@+# Changelog++All notable changes to this project will be documented in this file.++The format is based on [Keep a Changelog 1.1](https://keepachangelog.com/en/1.1.0/),+and this project adheres to the [Haskell Package Versioning Policy](https://pvp.haskell.org/).++## [0.1.2.2] - 2024-09-02++### Updated++- link to published packages in README+- add updated versioning documentation to README+- include this file in `extra-doc-files`++### Removed++- `-fpackage-trust` and related options because they cause more trouble than they’re worth++## [0.1.2.1] - 2024-05-26++### Fixed++- the license report to reflect the GHC 9.10 build++## [0.1.2.0] - 2024-05-19++### Added++- support for [GHC 9.10](https://www.haskell.org/ghc/download_ghc_9_10_1.html)++## [0.1.1.0] - 2024-04-16++### Added++- source annotations (`{-# ANN … "Recursion" #-}`) to enable/disable the plugin+  for limited scopes++## [0.1.0.0] - 2024-04-13++### Added++- Initial release of this package++[0.1.2.2]: https://github.com/sellout/no-recursion/compare/v0.1.2.1...v0.1.2.2+[0.1.2.1]: https://github.com/sellout/no-recursion/compare/v0.1.2.0...v0.1.2.1+[0.1.2.0]: https://github.com/sellout/no-recursion/compare/v0.1.1.0...v0.1.2.0+[0.1.1.0]: https://github.com/sellout/no-recursion/compare/v0.1.0.0...v0.1.1.0+[0.1.0.0]: https://github.com/sellout/no-recursion/releases/tag/v0..1.0.0
README.md view
@@ -1,5 +1,8 @@ # NoRecursion plugin +[![Packaging status](https://repology.org/badge/tiny-repos/haskell:no-recursion.svg)](https://repology.org/project/haskell:no-recursion/versions)+[![latest packaged versions](https://repology.org/badge/latest-versions/haskell:no-recursion.svg)](https://repology.org/project/haskell:no-recursion/versions)+ A GHC plugin to remove support for recursion  General recursion can be the cause of a lot of problems. This removes recursion from GHC, allowing you to guarantee you’re using other mechanisms, like recursion schemes.@@ -59,11 +62,91 @@  For more about how to use annotations, see [the GHC User’s Guide](https://downloads.haskell.org/ghc/latest/docs/users_guide/extending_ghc.html#source-annotations). +## versioning++This project largely follows the [Haskell Package Versioning Policy](https://pvp.haskell.org/) (PVP), but is more strict in some ways.++The version always has four components, `A.B.C.D`. The first three correspond to those required by PVP, while the fourth matches the “patch” component from [Semantic Versioning](https://semver.org/).++Here is a breakdown of some of the constraints:++### sensitivity to additions to the API++PVP recommends that clients follow [these import guidelines](https://wiki.haskell.org/Import_modules_properly) in order that they may be considered insensitive to additions to the API. However, this isn’t sufficient. We expect clients to follow these additional recommendations for API insensitivity++If you don’t follow these recommendations (in addition to the ones made by PVP), you should ensure your dependencies don’t allow a range of `C` values. That is, your dependencies should look like++```cabal+yaya >=1.2.3 && <1.2.4+```++rather than++```cabal+yaya >=1.2.3 && <1.3+```++#### use package-qualified imports everywhere++If your imports are [package-qualified](https://downloads.haskell.org/ghc/latest/docs/users_guide/exts/package_qualified_imports.html?highlight=packageimports#extension-PackageImports), then a dependency adding new modules can’t cause a conflict with modules you already import.++#### avoid orphans++Because of the transitivity of instances, orphans make you sensitive to your dependencies’ instances. If you have an orphan instance, you are sensitive to the APIs of the packages that define the class and the types of the instance.++One way to minimize this sensitivity is to have a separate package (or packages) dedicated to any orphans you have. Those packages can be sensitive to their dependencies’ APIs, while the primary package remains insensitive, relying on the tighter ranges of the orphan packages to constrain the solver.++### transitively breaking changes (increments `A`)++#### removing a type class instance++Type class instances are imported transitively, and thus changing them can impact packages that only have your package as a transitive dependency.++#### widening a dependency range with new major versions++This is a consequence of instances being transitively imported. A new major version of a dependency can remove instances, and that can break downstream clients that unwittingly depended on those instances.++A library _may_ declare that it always bumps the `A` component when it removes an instance (as this policy dictates). In that case, only `A` widenings need to induce `A` bumps. `B` widenings can be `D` bumps like other widenings, Alternatively, one may compare the APIs when widening a dependency range, and if no instances have been removed, make it a `D` bump.++### breaking changes (increments `B`)++#### restricting an existing dependency’s version range in any way++Consumers have to contend not only with our version bounds, but also with those of other libraries. It’s possible that some dependency overlapped in a very narrow way, and even just restricting a particular patch version of a dependency could make it impossible to find a dependency solution.++#### restricting the license in any way++Making a license more restrictive may prevent clients from being able to continue using the package.++#### adding a dependency++A new dependency may make it impossible to find a solution in the face of other packages dependency ranges.++### non-breaking changes (increments `C`)++#### adding a module++This is also what PVP recommends. However, unlike in PVP, this is because we recommend that package-qualified imports be used on all imports.++### other changes (increments `D`)++#### widening a dependency range for non-major versions++This is fairly uncommon, in the face of `^>=`-style ranges, but it can happen in a few situations.++#### deprecation++**NB**: This case is _weaker_ than PVP, which indicates that packages should bump their major version when adding `deprecation` pragmas.++We disagree with this because packages shouldn’t be _publishing_ with `-Werror`. The intent of deprecation is to indicate that some API _will_ change. To make that signal a major change itself defeats the purpose. You want people to start seeing that warning as soon as possible. The major change occurs when you actually remove the old API.++Yes, in development, `-Werror` is often (and should be) used. However, that just helps developers be aware of deprecations more immediately. They can always add `-Wwarn=deprecation` in some scope if they need to avoid updating it for the time being.+ ## licensing  This package is licensed under [The GNU AGPL 3.0 or later](./LICENSE). If you need a license for usage that isn’t covered under the AGPL, please contact [Greg Pfeil](mailto:greg@technomadic.org?subject=licensing%20no-recursion). -When last checked, all transitive dependencies were licensed under [The 3-Clause BSD License](http://hackage.haskell.org/package/base-4.19.0.0/src/LICENSE). However, you should review the [license report](docs/license-report.md) for more details.+You should review the [license report](docs/license-report.md) for details about dependency licenses.  ## comparisons 
docs/license-report.md view
@@ -2,41 +2,44 @@  # Dependency License Report -Bold-faced **`package-name`**s denote standard libraries bundled with `ghc-9.8.1`.+Bold-faced **`package-name`**s denote standard libraries bundled with `ghc-9.10.1`.  ## Direct dependencies of `no-recursion:lib:no-recursion`  | Name | Version | [SPDX](https://spdx.org/licenses/) License Id | Description | Also depended upon by | | --- | --- | --- | --- | --- |-| **`base`** | [`4.19.0.0`](http://hackage.haskell.org/package/base-4.19.0.0) | [`BSD-3-Clause`](http://hackage.haskell.org/package/base-4.19.0.0/src/LICENSE) | Basic libraries | *(core library)* |-| **`ghc`** | [`9.8.1`](http://hackage.haskell.org/package/ghc-9.8.1) | [`BSD-3-Clause`](http://hackage.haskell.org/package/ghc-9.8.1/src/LICENSE) | The GHC API |  |+| **`base`** | [`4.20.0.0`](http://hackage.haskell.org/package/base-4.20.0.0) | [`BSD-3-Clause`](http://hackage.haskell.org/package/base-4.20.0.0/src/LICENSE) | Core data structures and operations | *(core library)* |+| **`ghc`** | [`9.10.1`](http://hackage.haskell.org/package/ghc-9.10.1) | [`BSD-3-Clause`](http://hackage.haskell.org/package/ghc-9.10.1/src/LICENSE) | The GHC API |  |  ## Indirect transitive dependencies  | Name | Version | [SPDX](https://spdx.org/licenses/) License Id | Description | Depended upon by | | --- | --- | --- | --- | --- |-| **`array`** | [`0.5.6.0`](http://hackage.haskell.org/package/array-0.5.6.0) | [`BSD-3-Clause`](http://hackage.haskell.org/package/array-0.5.6.0/src/LICENSE) | Mutable and immutable arrays | `binary`, `containers`, `deepseq`, `ghc`, `ghci`, `stm` |-| **`binary`** | [`0.8.9.1`](http://hackage.haskell.org/package/binary-0.8.9.1) | [`BSD-3-Clause`](http://hackage.haskell.org/package/binary-0.8.9.1/src/LICENSE) | Binary serialisation for Haskell values using lazy ByteStrings | `ghc`, `ghc-boot`, `ghci` |-| **`bytestring`** | [`0.12.0.2`](http://hackage.haskell.org/package/bytestring-0.12.0.2) | [`BSD-3-Clause`](http://hackage.haskell.org/package/bytestring-0.12.0.2/src/LICENSE) | Fast, compact, strict and lazy byte strings with a list interface | `binary`, `filepath`, `ghc`, `ghc-boot`, `ghci`, `unix` |-| **`containers`** | [`0.6.8`](http://hackage.haskell.org/package/containers-0.6.8) | [`BSD-3-Clause`](http://hackage.haskell.org/package/containers-0.6.8/src/LICENSE) | Assorted concrete container types | `binary`, `ghc`, `ghc-boot`, `ghc-heap`, `ghci`, `hpc` |-| **`deepseq`** | [`1.5.0.0`](http://hackage.haskell.org/package/deepseq-1.5.0.0) | [`BSD-3-Clause`](http://hackage.haskell.org/package/deepseq-1.5.0.0/src/LICENSE) | Deep evaluation of data structures | `bytestring`, `containers`, `filepath`, `ghc`, `ghc-boot`, `ghci`, `hpc`, `pretty`, `process`, `time` |-| **`directory`** | [`1.3.8.1`](http://hackage.haskell.org/package/directory-1.3.8.1) | [`BSD-3-Clause`](http://hackage.haskell.org/package/directory-1.3.8.1/src/LICENSE) | Platform-agnostic library for filesystem operations | `ghc`, `ghc-boot`, `hpc`, `process` |-| **`exceptions`** | [`0.10.7`](http://hackage.haskell.org/package/exceptions-0.10.7) | [`BSD-3-Clause`](http://hackage.haskell.org/package/exceptions-0.10.7/src/LICENSE) | Extensible optionally-pure exceptions | `filepath`, `ghc`, `semaphore-compat` |-| **`filepath`** | [`1.4.100.4`](http://hackage.haskell.org/package/filepath-1.4.100.4) | [`BSD-3-Clause`](http://hackage.haskell.org/package/filepath-1.4.100.4/src/LICENSE) | Library for manipulating FilePaths in a cross platform way. | `directory`, `ghc`, `ghc-boot`, `ghci`, `hpc`, `process`, `unix` |-| **`ghc-bignum`** | [`1.3`](http://hackage.haskell.org/package/ghc-bignum-1.3) | [`BSD-3-Clause`](http://hackage.haskell.org/package/ghc-bignum-1.3/src/LICENSE) | GHC BigNum library | `base` |-| **`ghc-boot`** | [`9.8.1`](http://hackage.haskell.org/package/ghc-boot-9.8.1) | [`BSD-3-Clause`](http://hackage.haskell.org/package/ghc-boot-9.8.1/src/LICENSE) | Shared functionality between GHC and its boot libraries | `ghc`, `ghci` |-| **`ghc-boot-th`** | [`9.8.1`](http://hackage.haskell.org/package/ghc-boot-th-9.8.1) | [`BSD-3-Clause`](http://hackage.haskell.org/package/ghc-boot-th-9.8.1/src/LICENSE) | Shared functionality between GHC and the @template-haskell@ library | `ghc-boot`, `template-haskell` |-| **`ghc-heap`** | [`9.8.1`](http://hackage.haskell.org/package/ghc-heap-9.8.1) | [`BSD-3-Clause`](http://hackage.haskell.org/package/ghc-heap-9.8.1/src/LICENSE) | Functions for walking GHC's heap | `ghc`, `ghci` |+| **`array`** | [`0.5.7.0`](http://hackage.haskell.org/package/array-0.5.7.0) | [`BSD-3-Clause`](http://hackage.haskell.org/package/array-0.5.7.0/src/LICENSE) | Mutable and immutable arrays | `binary`, `containers`, `deepseq`, `ghc`, `ghci`, `stm` |+| **`binary`** | [`0.8.9.2`](http://hackage.haskell.org/package/binary-0.8.9.2) | [`BSD-3-Clause`](http://hackage.haskell.org/package/binary-0.8.9.2/src/LICENSE) | Binary serialisation for Haskell values using lazy ByteStrings | `ghc`, `ghc-boot`, `ghci` |+| **`bytestring`** | [`0.12.1.0`](http://hackage.haskell.org/package/bytestring-0.12.1.0) | [`BSD-3-Clause`](http://hackage.haskell.org/package/bytestring-0.12.1.0/src/LICENSE) | Fast, compact, strict and lazy byte strings with a list interface | `binary`, `filepath`, `ghc`, `ghc-boot`, `ghci`, `os-string`, `unix` |+| **`containers`** | [`0.7`](http://hackage.haskell.org/package/containers-0.7) | [`BSD-3-Clause`](http://hackage.haskell.org/package/containers-0.7/src/LICENSE) | Assorted concrete container types | `binary`, `ghc`, `ghc-boot`, `ghc-heap`, `ghci`, `hpc` |+| **`deepseq`** | [`1.5.0.0`](http://hackage.haskell.org/package/deepseq-1.5.0.0) | [`BSD-3-Clause`](http://hackage.haskell.org/package/deepseq-1.5.0.0/src/LICENSE) | Deep evaluation of data structures | `bytestring`, `containers`, `filepath`, `ghc`, `ghc-boot`, `ghci`, `hpc`, `os-string`, `pretty`, `process`, `time` |+| **`directory`** | [`1.3.8.3`](http://hackage.haskell.org/package/directory-1.3.8.3) | [`BSD-3-Clause`](http://hackage.haskell.org/package/directory-1.3.8.3/src/LICENSE) | Platform-agnostic library for filesystem operations | `ghc`, `ghc-boot`, `hpc`, `process` |+| **`exceptions`** | [`0.10.7`](http://hackage.haskell.org/package/exceptions-0.10.7) | [`BSD-3-Clause`](http://hackage.haskell.org/package/exceptions-0.10.7/src/LICENSE) | Extensible optionally-pure exceptions | `filepath`, `ghc`, `os-string`, `semaphore-compat` |+| **`filepath`** | [`1.5.2.0`](http://hackage.haskell.org/package/filepath-1.5.2.0) | [`BSD-3-Clause`](http://hackage.haskell.org/package/filepath-1.5.2.0/src/LICENSE) | Library for manipulating FilePaths in a cross platform way. | `directory`, `ghc`, `ghc-boot`, `ghci`, `hpc`, `process`, `unix` |+| **`ghc-bignum`** | [`1.3`](http://hackage.haskell.org/package/ghc-bignum-1.3) | [`BSD-3-Clause`](http://hackage.haskell.org/package/ghc-bignum-1.3/src/LICENSE) | GHC BigNum library | `ghc-internal` |+| **`ghc-boot`** | [`9.10.1`](http://hackage.haskell.org/package/ghc-boot-9.10.1) | [`BSD-3-Clause`](http://hackage.haskell.org/package/ghc-boot-9.10.1/src/LICENSE) | Shared functionality between GHC and its boot libraries | `ghc`, `ghci` |+| **`ghc-boot-th`** | [`9.10.1`](http://hackage.haskell.org/package/ghc-boot-th-9.10.1) | [`BSD-3-Clause`](http://hackage.haskell.org/package/ghc-boot-th-9.10.1/src/LICENSE) | Shared functionality between GHC and the @template-haskell@ library | `ghc-boot`, `template-haskell` |+| **`ghc-heap`** | [`9.10.1`](http://hackage.haskell.org/package/ghc-heap-9.10.1) | [`BSD-3-Clause`](http://hackage.haskell.org/package/ghc-heap-9.10.1/src/LICENSE) | Functions for walking GHC's heap | `ghc`, `ghci` |+| **`ghc-internal`** | [`9.1001.0`](http://hackage.haskell.org/package/ghc-internal-9.1001.0) | [`BSD-3-Clause`](http://hackage.haskell.org/package/ghc-internal-9.1001.0/src/LICENSE) | Basic libraries | `base`, `ghc-heap` |+| **`ghc-platform`** | [`0.1.0.0`](http://hackage.haskell.org/package/ghc-platform-0.1.0.0) |  *MISSING* | *MISSING* | `ghc-boot` | | **`ghc-prim`** | [`0.11.0`](http://hackage.haskell.org/package/ghc-prim-0.11.0) | [`BSD-3-Clause`](http://hackage.haskell.org/package/ghc-prim-0.11.0/src/LICENSE) | GHC primitives | *(core library)* |-| **`ghci`** | [`9.8.1`](http://hackage.haskell.org/package/ghci-9.8.1) |  *MISSING* | *MISSING* | `ghc` |-| **`hpc`** | [`0.7.0.0`](http://hackage.haskell.org/package/hpc-0.7.0.0) | [`BSD-3-Clause`](http://hackage.haskell.org/package/hpc-0.7.0.0/src/LICENSE) | Code Coverage Library for Haskell | `ghc` |+| **`ghci`** | [`9.10.1`](http://hackage.haskell.org/package/ghci-9.10.1) |  *MISSING* | *MISSING* | `ghc` |+| **`hpc`** | [`0.7.0.1`](http://hackage.haskell.org/package/hpc-0.7.0.1) | [`BSD-3-Clause`](http://hackage.haskell.org/package/hpc-0.7.0.1/src/LICENSE) | Code Coverage Library for Haskell | `ghc` | | **`mtl`** | [`2.3.1`](http://hackage.haskell.org/package/mtl-2.3.1) | [`BSD-3-Clause`](http://hackage.haskell.org/package/mtl-2.3.1/src/LICENSE) | Monad classes for transformers, using functional dependencies | `exceptions` |+| **`os-string`** | [`2.0.2`](http://hackage.haskell.org/package/os-string-2.0.2) | [`BSD-3-Clause`](http://hackage.haskell.org/package/os-string-2.0.2/src/LICENSE) | Library for manipulating Operating system strings. | `directory`, `filepath`, `unix` | | **`pretty`** | [`1.1.3.6`](http://hackage.haskell.org/package/pretty-1.1.3.6) | [`BSD-3-Clause`](http://hackage.haskell.org/package/pretty-1.1.3.6/src/LICENSE) | Pretty-printing library | `template-haskell` |-| **`process`** | [`1.6.18.0`](http://hackage.haskell.org/package/process-1.6.18.0) | [`BSD-3-Clause`](http://hackage.haskell.org/package/process-1.6.18.0/src/LICENSE) | Process libraries | `ghc` |+| **`process`** | [`1.6.19.0`](http://hackage.haskell.org/package/process-1.6.19.0) | [`BSD-3-Clause`](http://hackage.haskell.org/package/process-1.6.19.0/src/LICENSE) | Process libraries | `ghc` | | **`semaphore-compat`** | [`1.0.0`](http://hackage.haskell.org/package/semaphore-compat-1.0.0) | [`BSD-3-Clause`](http://hackage.haskell.org/package/semaphore-compat-1.0.0) | Cross-platform abstraction for system semaphores | `ghc` |-| **`stm`** | [`2.5.2.1`](http://hackage.haskell.org/package/stm-2.5.2.1) | [`BSD-3-Clause`](http://hackage.haskell.org/package/stm-2.5.2.1/src/LICENSE) | Software Transactional Memory | `exceptions`, `ghc` |-| **`template-haskell`** | [`2.21.0.0`](http://hackage.haskell.org/package/template-haskell-2.21.0.0) | [`BSD-3-Clause`](http://hackage.haskell.org/package/template-haskell-2.21.0.0/src/LICENSE) | Support library for Template Haskell | `bytestring`, `containers`, `exceptions`, `filepath`, `ghc`, `ghci` |+| **`stm`** | [`2.5.3.1`](http://hackage.haskell.org/package/stm-2.5.3.1) | [`BSD-3-Clause`](http://hackage.haskell.org/package/stm-2.5.3.1/src/LICENSE) | Software Transactional Memory | `exceptions`, `ghc` |+| **`template-haskell`** | [`2.22.0.0`](http://hackage.haskell.org/package/template-haskell-2.22.0.0) | [`BSD-3-Clause`](http://hackage.haskell.org/package/template-haskell-2.22.0.0/src/LICENSE) | Support library for Template Haskell | `bytestring`, `containers`, `exceptions`, `filepath`, `ghc`, `ghci`, `os-string` | | **`time`** | [`1.12.2`](http://hackage.haskell.org/package/time-1.12.2) | [`BSD-2-Clause`](http://hackage.haskell.org/package/time-1.12.2/src/LICENSE) | A time library | `directory`, `ghc`, `hpc`, `unix` |-| **`transformers`** | [`0.6.1.0`](http://hackage.haskell.org/package/transformers-0.6.1.0) | [`BSD-3-Clause`](http://hackage.haskell.org/package/transformers-0.6.1.0/src/LICENSE) | Concrete functor and monad transformers | `exceptions`, `ghc`, `ghci`, `mtl` |-| **`unix`** | [`2.8.3.0`](http://hackage.haskell.org/package/unix-2.8.3.0) | [`BSD-3-Clause`](http://hackage.haskell.org/package/unix-2.8.3.0/src/LICENSE) | POSIX functionality | `directory`, `ghc`, `ghc-boot`, `ghci`, `process`, `semaphore-compat` |+| **`transformers`** | [`0.6.1.1`](http://hackage.haskell.org/package/transformers-0.6.1.1) | [`BSD-3-Clause`](http://hackage.haskell.org/package/transformers-0.6.1.1/src/LICENSE) | Concrete functor and monad transformers | `exceptions`, `ghc`, `ghci`, `mtl` |+| **`unix`** | [`2.8.5.1`](http://hackage.haskell.org/package/unix-2.8.5.1) | [`BSD-3-Clause`](http://hackage.haskell.org/package/unix-2.8.5.1/src/LICENSE) | POSIX functionality | `directory`, `ghc`, `ghc-boot`, `ghci`, `process`, `semaphore-compat` | 
no-recursion.cabal view
@@ -1,7 +1,7 @@ cabal-version: 3.0  name: no-recursion-version: 0.1.2.0+version: 0.1.2.2 synopsis: A GHC plugin to remove support for recursion description: General recursion can be the cause of a lot of problems. This              removes recursion from GHC, allowing you to guarantee you’re using@@ -17,23 +17,23 @@ license-files:   LICENSE extra-doc-files:+  CHANGELOG.md   README.md   docs/*.md tested-with:   GHC == {---  GHCup   Nixpkgs     7.10.3,     8.0.2,     8.2.2,     8.4.1,     8.6.1,-    8.8.1,  8.8.4,+    8.8.1,     8.10.1, 8.10.7,-    9.0.1,  9.0.2,-    9.2.1,  9.2.8,-    9.4.1,  9.4.8,-    9.6.1,  9.6.2,-            9.8.1,+    9.0.1, 9.0.2,+    9.2.1, 9.2.5,+    9.4.1, 9.4.5,+    9.6.1, 9.6.3,+    9.8.1,     9.10.1   } @@ -91,7 +91,6 @@     -- TypeApplications -- uncomment if the oldest supported version is GHC 8.0.1+     TypeOperators     UnicodeSyntax-    NoExplicitNamespaces  flag noisy-deprecations   description:@@ -106,9 +105,6 @@   import: GHC2024   build-depends:     base ^>= {4.8.2, 4.9.1, 4.10.1, 4.11.0, 4.12.0, 4.13.0, 4.14.0, 4.15.0, 4.16.0, 4.17.0, 4.18.0, 4.19.0, 4.20.0},-  ghc-options:-    -fpackage-trust-    -trust base   if impl(ghc >= 8.0.1)     ghc-options:       -Weverything@@ -132,8 +128,6 @@       -Wno-inferred-safe-imports       -- We support GHC versions without qualified-post.       -Wno-prepositive-qualified-module-      -- `-trust` triggers this warning when applied to transitive dependencies.-      -Wno-unused-packages   if impl(ghc >= 9.2.1)     ghc-options:       -- We support GHC versions without kind signatures.@@ -144,9 +138,6 @@       -Wno-missing-poly-kind-signatures       -- Inference good.       -Wno-missing-role-annotations-  if impl(ghc >= 9.10.1)-    ghc-options:-      -trust ghc-internal   default-extensions:     DefaultSignatures     FunctionalDependencies@@ -175,7 +166,7 @@ custom-setup   setup-depends:     -- TODO: Remove `Cabal` dep once haskell/cabal#3751 is fixed.-    Cabal ^>= {3.0.0, 3.2.0, 3.4.0, 3.6.0, 3.8.0, 3.10.0, 3.12.0},+    Cabal ^>= {3.0.0, 3.2.0, 3.4.0, 3.6.0, 3.8.0, 3.10.0},     base ^>= {4.8.2, 4.9.1, 4.10.1, 4.11.0, 4.12.0, 4.13.0, 4.14.0, 4.15.0, 4.16.0, 4.17.0, 4.18.0, 4.19.0, 4.20.0},     cabal-doctest ^>= {1.0.0}, @@ -187,43 +178,36 @@   if impl(ghc < 8.0.1)     build-depends:       semigroups ^>= {0.20},-    ghc-options:-      -trust containers-      -trust semigroups-  if impl(ghc >= 9.10.1)-    ghc-options:-      -trust ghc-internal   exposed-modules:     NoRecursion  test-suite doctests   import: defaults+  type: exitcode-stdio-1.0   hs-source-dirs: tests-  -- doctest doesn’t yet support GHC 9.10-  if impl(ghc < 9.10.1)-    type: exitcode-stdio-1.0-    main-is: doctests.hs+  main-is: doctests.hs+  build-depends:+    doctest ^>= {0.16.0, 0.18.1, 0.20.0, 0.21.1, 0.22.2},+    no-recursion,+  if impl(ghc < 8.0.1)     build-depends:-      doctest ^>= {0.16.0, 0.18.1, 0.20.1, 0.21.1, 0.22.2},-      no-recursion,-  else-    type: exitcode-stdio-1.0-    main-is: skipped.hs+      semigroups ^>= {0.20},+  if impl(ghc >= 8.10.1)+    ghc-options:+      -- `doctest` requires the package containing the doctests as a dependency+      -- to ensure it gets built before this test-suite, even though the package+      -- appears to be unused.+      -Wno-unused-packages   -- TODO: The sections below here are necessary because we don’t have control   --       over the generated `Build_doctests.hs` file. So we have to silence   --       all of its warnings one way or another.   if impl(ghc >= 8.0.1)     ghc-options:       -Wno-missing-import-lists-      -- This used to warn even when `Safe` was explicit.       -Wno-safe   else-    build-depends:-      semigroups ^>= {0.20},     ghc-options:       -fno-warn-missing-import-lists-      -trust containers-      -trust semigroups   if impl(ghc >= 8.4.1)     ghc-options:       -Wno-missing-export-lists
+ tests/doctests.hs view
@@ -0,0 +1,14 @@+{-# LANGUAGE Unsafe #-}++module Main (main) where++-- NB: This unqualified module comes from semigroups in GHC <8, and base+--     otherwise.+import safe Data.Semigroup (Semigroup ((<>)))+import safe "base" Data.Function (($))+import safe "base" System.IO (IO)+import "doctest" Test.DocTest (doctest)+import "this" Build_doctests (flags, module_sources, pkgs)++main :: IO ()+main = doctest $ flags <> pkgs <> module_sources
− tests/skipped.hs
@@ -1,13 +0,0 @@--- __NB__: This module is /not/ @Unsafe@, but because of how it’s conditionally---         compiled with doctests.hs, Hlint and Ormolu get confused if it’s---         marked @Safe@.-{-# LANGUAGE Unsafe #-}---- | This module allow us to skip test suites entirely for certain system---   configurations.-module Main (main) where--import System.IO (IO, putStrLn)--main :: IO ()-main = putStrLn "Skipped doctests suite on this system."