dreamstop.openfp.net, the website and user manual of dreamstop, a language for continuous disambiguation
git clone git@nixlab.openfp.net:web/dreamstop.openfp.net.git-- | What the page says that is data: its links, a clear ChangeLog entry, the
-- examples for each codepoint position and the minimal pair. Every example is
-- quoted word for word from the OpenFP Quality Control Handbook 0.18.0.0 or
-- from a real document named in its source.
--
-- @since 0.1.0.0
module Site.Content
( repository
, package
, manual
, Reading (MkReading, readingCodes, readingGloss)
, Example (MkExample, exampleLabel, exampleSentence, exampleReadings)
, Entry (MkEntry, entryHeading, entrySentences, entrySource)
, entry
, Layer (Force, Mood, Aspect, Phase, Modality, Negation, Bound, Evidence, Nominalisation)
, layers
, layerName
, Verdict (Clear, Ambiguous, Nonsense)
, verdictName
, LayerExample (MkLayerExample, layerVerdict, layerExample, layerDecides, layerSource)
, layerExamples
, Segment (Words, Code)
, Prose
, positionNote
, pair
, pairSlot
) where
import Data.Kind (Type)
import Miso.String (MisoString)
-- | This page's repository on the forge.
--
-- @since 0.1.0.0
repository :: MisoString
repository = "https://nixlab.openfp.net/web/dreamstop.openfp.net"
-- | The dreamstop package's repository on the forge.
--
-- @since 0.1.0.0
package :: MisoString
package = "https://nixlab.openfp.net/dreamstop/dreamstop"
-- | The user manual, a PDF published with the page.
--
-- @since 0.1.0.0
manual :: MisoString
manual = "manual/dreamstop.pdf"
-- | One reading of a sentence: its codes and a plain gloss.
--
-- @since 0.2.0.0
type Reading :: Type
data Reading = MkReading
{ readingCodes :: MisoString
, readingGloss :: MisoString
}
-- | An example sentence under a label, with every reading annotators find.
-- No reading means the sentence is nonsense.
--
-- @since 0.2.0.0
type Example :: Type
data Example = MkExample
{ exampleLabel :: MisoString
, exampleSentence :: MisoString
, exampleReadings :: [Reading]
}
-- | A whole ChangeLog entry: its release heading, each bullet with its one
-- reading, and where it was published. Review checks the source, and the
-- page does not show it.
--
-- @since 0.3.0.0
type Entry :: Type
data Entry = MkEntry
{ entryHeading :: MisoString
, entrySentences :: [Example]
, entrySource :: MisoString
}
-- | The 0.21.0 entry of the horizon-flake-parts ChangeLog, as tag 0.46.1
-- publishes it. Every bullet is clear under the ChangeLog kind: each clause
-- is a release action.
--
-- @since 0.3.0.0
entry :: Entry
entry =
MkEntry
"## 0.21.0 — 2026-04-14"
[ MkExample
"1"
"Added horizon-end-user-assurances 0.1.0 and its named required-package lists."
[MkReading "[ASR·PFV]" "the release added the package and its lists"]
, MkExample
"2"
"Added the required-package presence check to `horizon.packageSet`."
[MkReading "[ASR·PFV] {check: BSC}" "the release added the check, the procedure itself"]
, MkExample
"3"
"Added `cabal update` before the horizon-gen-nix CI job and made its cabal-install package configurable through `horizon-gen-nix.cabal`."
[MkReading "[ASR·PFV] [ASR·PFV]" "two things the release did: it added the update step and it made the package configurable"]
]
"From the ChangeLog of horizon-flake-parts, release 0.21.0, as published in tag 0.46.1."
-- | A codepoint position, in the order the manual's reference table lists them.
--
-- @since 0.3.0.0
type Layer :: Type
data Layer
= Force
| Mood
| Aspect
| Phase
| Modality
| Negation
| Bound
| Evidence
| Nominalisation
deriving stock (Eq, Enum, Bounded)
-- | Every position, first to last.
--
-- @since 0.3.0.0
layers :: [Layer]
layers = [minBound .. maxBound]
-- | A position's name, which is also the class codepoints.css colours it by.
--
-- @since 0.3.0.0
layerName :: Layer -> MisoString
layerName = \case
Force -> "Force"
Mood -> "Mood"
Aspect -> "Aspect"
Phase -> "Phase"
Modality -> "Modality"
Negation -> "Negation"
Bound -> "Bound"
Evidence -> "Evidence"
Nominalisation -> "Nominalisation"
-- | The verdict an example shows.
--
-- @since 0.3.0.0
type Verdict :: Type
data Verdict = Clear | Ambiguous | Nonsense
-- | A verdict's label.
--
-- @since 0.3.0.0
verdictName :: Verdict -> MisoString
verdictName = \case
Clear -> "Clear"
Ambiguous -> "Ambiguous"
Nonsense -> "Nonsense"
-- | One example under a position: its verdict, the sentence with its readings,
-- what the position's codes decide in it, and where it is quoted from.
-- Review checks the source, and the page does not show it.
--
-- @since 0.3.0.0
type LayerExample :: Type
data LayerExample = MkLayerExample
{ layerVerdict :: Verdict
, layerExample :: Example
, layerDecides :: Prose
, layerSource :: MisoString
}
-- | A position's clear, ambiguous and nonsense examples, each turning on that
-- position. A verdict with no real sentence for the position is left out.
--
-- @since 0.3.0.0
layerExamples :: Layer -> [LayerExample]
layerExamples = \case
Force ->
[ example Clear "This edition retires QC.DescribeCheckCoverage."
[MkReading "[DEC·PFV]" "saying it makes it so: the edition retires the rule"]
[Code "DEC", Words ": the sentence retires the rule by being said, rather than reporting a retirement."]
"From the ChangeLog of quality-control, release 0.7.0.0."
, example Ambiguous "Split vortex-shell from the vortex repository into its own repository."
[ MkReading "[ASR·PFV]" "reports that the release moved vortex-shell into its own repository"
, MkReading "[DIR·PFV]" "tells the reader to move it"
]
[Code "ASR", Words " or ", Code "DIR", Words ": the codes decide whether the sentence reports a change or gives an instruction."]
"From the ChangeLog of vortex-shell, release 0.1.0."
]
Mood ->
[ example Clear "This would have caught the dead buttons."
[MkReading "[ASR·COU·PFV]" "it did not catch them, and it would have if it had been in place"]
[Code "COU", Words ": the clause is considered, and known to be false."]
"From the unsafePerformApocalypse estate plan."
]
Aspect ->
[ example Clear "Added a console that preserves bindings between commands."
[MkReading "[ASR·PFV] [ASR·HAB]/rel1" "the release added the console, and preserving bindings is what the console does"]
[Code "PFV", Words " against ", Code "HAB", Words ": the adding is one event, and the preserving is standing behaviour."]
"From the Quality Control Handbook, CLG.ChooseEntryForms."
]
Phase ->
[ example Clear "A project or group called `sw.js` is not yet refused."
[MkReading "[ASR·HAB·EXP]" "not refused before the release or in it, and refusal is expected later"]
[Code "EXP", Words ": false before the release, false after it, and expected to change."]
"From the ChangeLog of nixlab-shell, release 0.98.0.0."
, example Nonsense "Removed the legacy importer, which reads the old export format." []
[Words "Under the release action, the relative clause says the importer reads the format from this release on, but the same release removes it."]
"From the Quality Control Handbook, CLG.DescribeAddedThingsInPresent."
]
Modality ->
[ example Clear "Callers of `runScript` must now pass a `Charge` record."
[MkReading "[ASR·HAB·INC·DEO·NEC]" "a rule now requires callers to pass one"]
[Code "DEO", Words "·", Code "NEC", Words ": a rule requires it."]
"From the Quality Control Handbook, CLG.StateReaderObligations."
, example Ambiguous "A site's `root` may now be a package or an absolute path."
[ MkReading "[ASR·HAB·INC·DEO·POS]" "a rule now allows either"
, MkReading "[ASR·HAB·INC·ABL·POS]" "the program can now take either"
]
[Code "DEO", Words " or ", Code "ABL", Words ": the codes decide whether a rule allows it or the program is able to do it."]
"From the ChangeLog of skettis, release 0.2.60."
]
Negation ->
[ example Clear "Maintainers must not edit the generated file by hand."
[MkReading "[ASR·HAB·DEO·NEC·NEG]" "a rule requires that they do not edit it"]
[Code "NEG", Words " after ", Code "DEO", Words "·", Code "NEC", Words " negates the edit, not the rule, so the sentence prohibits editing."]
"From the Quality Control Handbook, QC.ClarifyExceptionsAndNegation."
]
Bound ->
[ example Clear "The store now imports the SQLite review and sign-off tables once, at its first use."
[MkReading "[ASR·PFV·INC·ONE] {review: OBJ} {sign-off: OBJ}" "a one-off import, new in this release, at the store's first use"]
[Code "ONE", Words ": the import happens one time in the program's life."]
"From the ChangeLog of nixlab-shell, release 0.122.0.0."
, example Ambiguous "`MovesNotFollowed` or `CheckpointFailed` after the import is reported once and tried again with the next to-do call."
[ MkReading "[ASR·PFV·ONE] [ASR·HAB] {import: BSC} {call: BSC}" "the error is reported one time only"
, MkReading "[ASR·HAB] [ASR·HAB] {import: BSC} {call: BSC}" "the error is reported once for each failure"
]
[Code "ONE", Words " or none: the codes decide whether the report happens one time ever or each time."]
"From the deployment guide of systems/shattrath."
]
Evidence ->
[ example Clear "Median startup time fell from 800 ms to 200 ms with a warm library cache in the recorded benchmark."
[MkReading "[ASR·PFV·PUP]" "a measured fall, which the recorded benchmark lets anyone check"]
[Code "PUP", Words ": a record someone else can check backs the figure."]
"From the Quality Control Handbook, CLG.ChooseEntryForms."
]
Nominalisation ->
[ example Clear "On first start the forge now imports every review from the SQLite database once."
[MkReading "[ASR·PFV·INC·ONE] {start: BSC} {review: OBJ}" "a review here is a record, what reviewing produced"]
[Code "OBJ", Words ": review names the record, not the act of reviewing."]
"From the Quality Control Handbook, CLG.DescribeAddedThingsInPresent."
]
where
example :: Verdict -> MisoString -> [Reading] -> Prose -> MisoString -> LayerExample
example v s rs = MkLayerExample v (MkExample (verdictName v) s rs)
-- | The handbook's contrast for CLG.DescribeAddedThingsInPresent as a
-- minimal pair.
--
-- @since 0.1.0.0
pair :: [Example]
pair =
[ MkExample "Bad" "Added the review store, which moved reviews and sign-offs out of SQLite." [storeMoves, storeMoved]
, MkExample "Good" "Added the review store, which moves reviews and sign-offs out of SQLite." [storeMoves]
]
-- | The pair's edit and the one reading it leaves.
--
-- @since 0.1.0.0
pairSlot :: MisoString
pairSlot = "Changing “moved” to “moves” leaves one reading: what the store does."
-- | The review-store relative clause read as what the store does.
storeMoves :: Reading
storeMoves = MkReading "[ASR·PFV] {review: OBJ} [ASR·HAB]/rel1 {reviews: OBJ}" "the store moves reviews and sign-offs out of SQLite, which is what it does from now on"
-- | The review-store relative clause read as a migration that already happened.
storeMoved :: Reading
storeMoved = MkReading "[ASR·PFV] {review: OBJ} [ASR·PFV·ONE]/rel1 {reviews: OBJ}" "reviews and sign-offs were moved out of SQLite once, a migration that already happened"
-- | A piece of prose: plain words, or a code, which the page always shows in
-- its position's colour. Prose that names a code holds it as a @Code@, never
-- inside @Words@.
--
-- @since 0.4.0.0
type Segment :: Type
data Segment
= Words MisoString
| Code MisoString
-- | Prose made of words and codes.
--
-- @since 0.4.0.0
type Prose :: Type
type Prose = [Segment]
-- | What a position records, in one or two plain sentences that name its
-- codes.
--
-- @since 0.4.0.0
positionNote :: Layer -> Prose
positionNote = \case
Force ->
[ Words "Force says what a sentence does: it states something ("
, Code "ASR"
, Words "), tells the reader to act ("
, Code "DIR"
, Words "), asks a question ("
, Code "IRG"
, Words "), makes something so by saying it ("
, Code "DEC"
, Words "), warns of a risk ("
, Code "ADM"
, Words ") or makes a promise ("
, Code "CMS"
, Words ")."
]
Mood ->
[ Words "Mood says whether the writer stands behind a clause ("
, Code "FAC"
, Words "), only considers it without taking a side ("
, Code "HYP"
, Words "), or considers a clause known to be false ("
, Code "COU"
, Words ")."
]
Aspect ->
[ Words "Aspect says whether a clause reports one finished event ("
, Code "PFV"
, Words "), a state reached ("
, Code "PRF"
, Words "), something in progress ("
, Code "PRG"
, Words "), or something that happens regularly or simply holds ("
, Code "HAB"
, Words ")."
]
Phase ->
[ Words "Phase compares the version a text describes with the one before it: something is now true ("
, Code "INC"
, Words "), has stopped being true ("
, Code "CSS"
, Words "), stays true ("
, Code "CNT"
, Words "), or is expected but still not true ("
, Code "EXP"
, Words ")."
]
Modality ->
[ Words "Modality says what a clause rests on, a rule ("
, Code "DEO"
, Words "), what a thing can do ("
, Code "ABL"
, Words ") or what a goal needs ("
, Code "TEL"
, Words "), and how strongly: in every case ("
, Code "NEC"
, Words "), in the best cases ("
, Code "WNC"
, Words ") or in some case ("
, Code "POS"
, Words ")."
]
Negation ->
[ Words "Negation ("
, Code "NEG"
, Words ") says what a clause denies: the “may” or “must” itself, or the thing that may or must happen."
]
Bound ->
[ Words "Bound ("
, Code "ONE"
, Words ") marks something that happens exactly once in the program’s life, such as an import on first start, rather than every time."
]
Evidence ->
[ Words "Evidence says how the writer knows something: the writer observes it ("
, Code "OBS"
, Words "), a record anyone can check shows it ("
, Code "PUP"
, Words "), someone else reports it ("
, Code "RPR"
, Words "), the writer infers it ("
, Code "INF"
, Words "), or the writer remembers it ("
, Code "REC"
, Words ")."
]
Nominalisation ->
[ Words "Nominalisation says what a noun made from a verb means: the act itself ("
, Code "BSC"
, Words "), such as a check being run, or what the act produces ("
, Code "OBJ"
, Words "), such as a review."
]