Skip to content

Commit 2ebfb28

Browse files
Improve documentation in .Primitive modules (#1479)
1 parent c152a4a commit 2ebfb28

File tree

4 files changed

+27
-10
lines changed

4 files changed

+27
-10
lines changed

README.agda

+19-10
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,32 @@ module README where
1717
------------------------------------------------------------------------
1818

1919
-- This version of the library has been tested using Agda 2.6.1 and
20-
-- 2.6.1.1.
20+
-- 2.6.1.3.
2121

2222
-- The library comes with a .agda-lib file, for use with the library
2323
-- management system.
2424

2525
-- Currently the library does not support the JavaScript compiler
2626
-- backend.
2727

28+
------------------------------------------------------------------------
29+
-- Stability guarantees
30+
------------------------------------------------------------------------
31+
32+
-- We do our best to adhere to the spirit of semantic versioning in that
33+
-- minor versions should not break people's code. This applies to the
34+
-- the entire library with one exception: modules with names that end in
35+
-- either ".Core" or ".Primitive".
36+
37+
-- The former have (mostly) been created to avoid mutual recursion
38+
-- between modules and the latter to bind primitive operations to the
39+
-- more efficient operations supplied by the relevant backend.
40+
41+
-- These modules may undergo backwards incompatible changes between
42+
-- minor versions and therefore are imported directly at your own risk.
43+
-- Instead their contents should be accessed by their parent module,
44+
-- whose interface will remain stable.
45+
2846
------------------------------------------------------------------------
2947
-- High-level overview of contents
3048
------------------------------------------------------------------------
@@ -247,15 +265,6 @@ import README.Text.Regex
247265

248266
import README.Text.Tabular
249267

250-
------------------------------------------------------------------------
251-
-- Core modules
252-
------------------------------------------------------------------------
253-
254-
-- Some modules have names ending in ".Core". These modules are
255-
-- internal, and have (mostly) been created to avoid mutual recursion
256-
-- between modules. They should not be imported directly; their
257-
-- contents are reexported by other modules.
258-
259268
------------------------------------------------------------------------
260269
-- All library modules
261270
------------------------------------------------------------------------

src/IO/Primitive.agda

+2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
-- Primitive IO: simple bindings to Haskell types and functions
55
------------------------------------------------------------------------
66

7+
-- NOTE: the contents of this module should be accessed via `IO`.
8+
79
{-# OPTIONS --without-K #-}
810

911
module IO.Primitive where

src/IO/Primitive/Finite.agda

+3
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99

1010
module IO.Primitive.Finite where
1111

12+
-- NOTE: the contents of this module should be accessed via `IO` or
13+
-- `IO.Finite`.
14+
1215
open import Agda.Builtin.IO
1316
open import Agda.Builtin.String
1417
open import Agda.Builtin.Unit using () renaming (⊤ to Unit)

src/IO/Primitive/Infinite.agda

+3
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99

1010
module IO.Primitive.Infinite where
1111

12+
-- NOTE: the contents of this module should be accessed via `IO` or
13+
-- `IO.Infinite`.
14+
1215
open import Codata.Musical.Costring
1316
open import Agda.Builtin.String
1417
open import Agda.Builtin.Unit renaming (⊤ to Unit)

0 commit comments

Comments
 (0)