<?xml version='1.0' ?>
<rfc category='exp' docName='draft-petithuguenin-computerate-specification-03' ipr='trust200902' sortRefs='true' submissionType='IETF' version='3'>
<front>
	<title>Computerate Specification</title>
	<author fullname="Marc Petit-Huguenin">
      <organization>Impedance Mismatch LLC</organization>
      <address>
		 <email>marc@petit-huguenin.org</email>
      </address>
   </author>
   <date day="05" year="2024" month="Aug" />
   <area>General</area>
   <abstract><t>
This document specifies computerate specifications, which are the combination of a formal and an informal specification such as parts of the informal specification are generated from the formal specification.
</t>









</abstract>
</front>

<middle>

<section anchor='introduction'>
<name>Introduction</name>
<t>
An informal specification is any document that is the combination of text, diagrams, tables, lists, and examples and whose purpose is to describe an engineering system.
An RFC is an example of informal specification when it describes network elements and the protocols that help these elements to interoperate.
</t>
<t>
Informal specifications are nowadays written on a computer, which makes them easier to write but not easier to reason about their correctness.
Computers can be used to model the engineering system that a specification is meant to describe, to verify that some properties hold for that model, and to automatically derive parts of the text, diagrams, list and examples that compose that specification.
This could be done in an ad-hoc way by copying and pasting results from external software, but this adds the burden for the specification authors of having to keep the software model and the specification synchronized.
</t>
<t>
A well-known consequence is when an example in a specification does not match the text, most likely because one of the two was modified without verifying that the other was updated.
</t>
<t>
To simplify the integration of code in a specification we introduce the concept of "Computerate Specifying", which is similar in appearance to <xref target='LitProg'>literate programming</xref>, but reversing the intent.
Literate programming is about interspersing code with the elements of a document, with the intent of producing a piece of code that can then be executed.
On the other hand computerate specifying is about interspersing a document with code, with the intent of producing a document that have some of its elements generated from the result of computations that uses that code.
</t>
<t>
"Computerate Specifying" is a play on "Literate Computing", itself a play on "Structured Computing" (see <xref target='Knuth92' /> page 99).
Note that "computerate" is a British English word.
To keep on the joke, an informal specification could be said to be an incomputerate specification, "incomputerate" being an Australian English word.
</t>
</section>
<section>
<name>Terminology</name>
<dl>
<dt>AsciiDoc: </dt><dd>The formal language in which the document part of a computerate specification is written.</dd><dt>Asciidoc: </dt><dd>An Idris2 package that is used to generate AsciiDoc fragments.</dd><dt>Asciidoctor: </dt><dd>An extensible processor for AsciiDoc document.</dd>
</dl>
</section>
<section anchor='asciidoc'>
<name>AsciiDoc</name>
<t>
There is a large variety of target formats in which a specification can be written (HTML, PDF, Word, Confluence), so we use <xref target='AsciiDoc' /> as a common format from which any of the target formats can be generated.
</t>
<t>
AsciiDoc is a text format, making it easy to mix with code and to integrate with the tools that programmers are most familiar with.
It has been chosen because it is derived from DocBook and because its main implementation, <xref target='Asciidoctor' />, can be easily extended and already have a large set of backends for various target formats:
</t>
<ul spacing='compact'>
<li>the HTML5, DocBook5, and Manpage back-ends are built-in</li><li>the PDF, Epub3, Reveal.js (slides) and many others are distributed as add-ons</li><li><xref target='Metanorma' /> distributes a set of back-end add-ons for the development of standard documents</li><li>an alternate <xref target='draft-petithuguenin-xml2rfc-asciidoc'>XML2RFC v3</xref> backend add-on is also available</li><li>a Confluence backend add-on is under development.</li>
</ul>
<t>
The AsciiDoc syntax is enriched with several extensions designed to support computerate specifications:
</t>
<ul spacing='compact'>
<li>the support for literate programming, by commenting out any line that starts with the '&gt;' character in the leftmost column</li><li>an inline macro that inserts the result of a computation as AsciiDoc formatted text</li><li>a block macro that inserts the result of a computation as AsciiDoc blocks.</li>
</ul>
<t>
These syntax extensions, which are described in the following sections, are implemented in the "asciidoctor-idris2" add-on.
</t>
<section>
<name>Literate Programming</name>
<t>
Idris2 shares with Haskell and other Haskell relatives built-in support for literate programming.
We use the Bird mode which marks lines of code with a '&gt;' symbol in the leftmost column.
The literate programming rule that states that a block of code must always be separated from normal text by at least one blank line applies.
</t>
<t>
The following example contains a block of two lines of Idris2 code:
</t>
<ul empty='true'>
<li><sourcecode type='asciidoc'><![CDATA[Some text

> a : Int
> a = 2

More text]]></sourcecode></li>
</ul>
<t>
Note that the '&gt;' symbol is also used by AsciiDoc as an alternate way of defining a blockquote which is consequently not available in a computerate specification.
The normal syntax for blockquotes must be used instead.
</t>
<t>
The code will not appear in the rendered document, but self-inclusion can be used to copy part of the code into the document, thus guaranteeing that this code is verified by the type-checker:
</t>
<ul empty='true'>
<li><sourcecode type='lidris2.asciidoc'><![CDATA[> -- tag::currying[]
> total
> currying : ((a, b) -> c) -> (a -> b -> c)
> currying f = \x => \y => f (x, y)
> -- end::currying[]

....
include::myfile.lidr[tag=currying]
....]]></sourcecode></li>
</ul>
<t>
Because Idris2 does not resolve forward references by default, self-inclusion can also be used to reorder paragraphs when the flow of explanations does not coincide with the flow of the code.
</t>
<t>
Alternating paragraphs of text and code permits to keep both representations as close as possible and is an effective way to quickly discover that the code and the text are diverging.
The convention is to insert the code beneath the text it is related to.
</t>
<t>
To be treated as a literate programming file, the AsciiDoc document must use the suffix ".lidr".
This generally means that a document will be split in multiple documents, some with the ".adoc" extension and some with the ".lidr" extension.
These files are put back together by using, directly or indirectly, AsciiDoc "include" statements in the files.
</t>
</section>
<section>
<name>Code Macros</name>
<t>
Using code macros in lieu of the equivalent constants in a document ensures that the text stays consistent during the development of the specification.
</t>
<t>
The type of the code passed to the macro must implement the <tt>Asciidoc</tt> interface so it is converted into properly escaped Asciidoc.
<xref target='idris2_extending' /> explains how to implement the <tt>Asciidoc</tt> interface for user defined types.
</t>
<t>
A code macro searches first for an <tt>Asciidoc</tt> implementation that has the same name than the back-end, then fallback to an unnamed implementation when a named implementation cannot be found.
This permits to use all the extensions specific to a particular back-end.
</t>
<section>
<name>Inline Code Macro</name>
<t>
The <tt>code:[]</tt> inline macro is used when the result is to be inserted as AsciiDoc inline text.
</t>
<t>
For instance the following excerpt taken from the computerate specification of <xref target='RFC8489' />:
</t>
<ul empty='true'>
<li><sourcecode type='lidris2.asciidoc'><![CDATA[> retrans' : Nat -> Int -> Maybe (List1 Int)
> retrans' rc = fromList . take rc . scanl (+) 0
>  . unfoldr (bimap id (*2) . dup)

> retrans : Nat -> Int -> String
> retrans rc = maybe "Error" 
>   (foldr1By (\e, a => show e ++ " ms, " ++ a)
>     (\x => "and " ++ show x ++ "ms")) . retrans' rc

> timeout : Nat -> Int -> Int -> String
> timeout rc rto rm = maybe "Error"
>   (\e => show (last e + rm * rto)) (retrans' rc rto)

> rc : Nat; rc = 7
> rto : Int; rto = 500
> rm : Int; rm = 16

For example, assuming an RTO of code:[rto]ms, requests would be
sent at times code:[retrans rc rto].
If the client has not received a response after code:[timeout] ms,
the client will consider the transaction to have timed out.]]></sourcecode></li>
</ul>
<t>
is rendered as
</t>
<t>
"For example, assuming an RTO of 500ms, requests would be
sent at times 0 ms, 500 ms, 1500 ms, 3500 ms, 7500 ms, 15500 ms, and 31500ms.
If the client has not received a response after 39500 ms, the
client will consider the transaction to have timed out."
</t>
</section>
<section>
<name>Block Code Macro</name>
<t>
The <tt>"code::[]"</tt> block macro (notice the double colon) is used to generate AsciiDoc blocks in a way similar to the inline code macro.
</t>
</section>
</section>
<section>
<name>IdrisDoc Generation</name>
<t>
The API documentation (IdrisDoc) generator in Idris has been extended to generate AsciiDoc instead of HTML.
An Asciidoctor include processor has been added to build and integrate that generated document as part of the document rendering.
</t>
<t>
For instance, the following generates the IdrisDoc for the asciidoc.ipkg package and includes the output in the document:
</t>
<ul empty='true'>
<li><sourcecode type='asciidoc'><![CDATA[include::asciidoc.ipkg[leveloffset=+2]]]></sourcecode></li>
</ul>
<t>
The document is generated with the main section at level one so the "leveloffset" attribute is used to update the actual section level.
</t>
</section>
</section>
<section anchor='idris2'>
<name>Idris2</name>
<t>
The code in a computerate specification uses the programming language <xref target='Idris2' /> in <xref target='Knuth92'>literate programming</xref> mode.
Although most programming languages could have been used, Idris2 has been chosen for the following features:
</t>
<ul spacing='compact'>
<li>purely functional</li><li>eager evaluation, with optional laziness</li><li>totality checking</li><li>dependent and linear type system.</li><li>reflection and meta-programming support</li><li>REPL.</li>
</ul>
<t>
The most important of these features are totality checking and the dependent type system, which permit to ensure an high level of correctness to the code.
Generating portions of a document from a programming language that lacks these features would only bring marginal improvements in the quality of a specification.
</t>
<t>
The next sections describe an Idris2 package that can be used to simplify the generation of IdrisDoc.
<xref target='library' /> lists the API for that same package.
</t>
<section>
<name>"Asciidoc" Module</name>
<t>
The <tt>Asciidoc</tt> module provides a way to programmatically build an AsciiDoc fragment without having to worry about the particular formatting details.
</t>
<t>
The elements of an AsciiDoc document are grouped in 4 categories:
</t>
<ul spacing='compact'>
<li>Content</li><li>Block</li><li>Top-level section</li><li>Document</li>
</ul>
<section>
<name>Content</name>
<t>
<tt>Content</tt> is the sum type of the possible parts that compose an AsciiDoc text:
</t>
<dl spacing='compact'>
<dt><tt>TextContent</tt>: </dt><dd>Plain text.</dd><dt><tt>BreakContent</tt>: </dt><dd>An hard line break.</dd><dt><tt>ItalicContent</tt>: </dt><dd>Italicized text.</dd><dt><tt>LinkContent</tt>: </dt><dd>An hyperlink.</dd><dt><tt>IndexContent</tt>: </dt><dd>A word that will be cross-referenced in the index.</dd><dt><tt>BoldContent</tt>: </dt><dd>Bold text.</dd><dt><tt>SubscriptContent</tt>: </dt><dd>Subscripted text.</dd><dt><tt>SuperscriptContent</tt>: </dt><dd>Superscripted text.</dd><dt><tt>MonospaceContent</tt>: </dt><dd>Monospaced text.</dd><dt><tt>CrossrefContent</tt>: </dt><dd>A cross reference to another part of the whole document.</dd><dt><tt>PassContent</tt>: </dt><dd>Text that is copied in the output document without further processing.</dd>
</dl>
<t>
<tt>OtherContent</tt> is used to extend the Content sum type with content that is specific to a backend.
</t>
</section>
<section>
<name>Block</name>
<t>
<tt>Block</tt> is the sum type of the possible blocks that compose an AsciiDoc document:
</t>
<dl spacing='compact'>
<dt><tt>ParagraphBlock</tt>: </dt><dd>A paragraph.</dd><dt><tt>LiteralBlock</tt>: </dt><dd>A pretty-printed block of text.</dd><dt><tt>ImageBlock</tt>: </dt><dd>An image.</dd><dt><tt>SourceBlock</tt>: </dt><dd>A pretty-printed block of source code.</dd><dt><tt>SidebarBlock</tt>: </dt><dd>Visually separated content.</dd><dt><tt>QuoteBlock</tt>: </dt><dd>A prose excerpt, quote, or verse.</dd><dt><tt>DefinitionListBlock</tt>: </dt><dd>An association list.</dd><dt><tt>OrderedListBlock</tt>: </dt><dd>An ordered list.</dd><dt><tt>UnorderedListBlock</tt>: </dt><dd>An unordered list.</dd><dt><tt>TableBlock</tt>: </dt><dd>An table.</dd><dt><tt>IndexBlock</tt>: </dt><dd>A word that will be cross-referenced in the index.</dd><dt><tt>PassBlock</tt>: </dt><dd>Text that is copied in the output document without further processing.</dd>
</dl>
<t>
<tt>OtherBlock</tt> is used to extend the Block sum type with blocks that are specific to a backend.
</t>
</section>
<section anchor='idris2_extending'>
<name>Implementing Asciidoc</name>
<t>
User-defined Idris2 types can implement the <tt>Asciidoc</tt> interface to streamline their conversion into AsciiDoc, in a way that is similar to the use of the standard <tt>Show</tt> and <tt>Pretty</tt> interfaces.
</t>
<t>
The <tt>Asciidoc</tt> interface defines two functions, <tt>contents</tt> and <tt>blocks</tt> which, after implementation, generates respectively a non-empty list of <tt>Content</tt> instances or a non-empty list of <tt>Block</tt> instances.
The former is called when using an inline code macro, the latter when using a block code macro.
Both functions are implemented by default so it is mandatory to implement only one of the two.
</t>
<t>
For example the following fragment defines how to render the result of a decision function in a specification:
</t>
<sourcecode type='asciidoc'><![CDATA[> Asciidoc (Dec a) where
>   contents (Yes prf) = singleton (TextContent "yes")
>   contents (No contra) = singleton (TextContent "no")

Is 1 + 1 = 2? code:[decEq (1 + 1) 2]. +
Is 1 + 1 = 3? code:[decEq (1 + 1) 3].]]></sourcecode>
<t>
The <tt>Asciidoc</tt> interface can be implemented multiple times using named implementations.
This is used to generate different content or block.
</t>
<t>
The <tt>Asciidoc</tt> interface is implemented for the builtin types <tt>String</tt>, <tt>Char</tt>, <tt>Integer</tt>, <tt>Int</tt>, <tt>Int8</tt>, <tt>Int16</tt>, <tt>Int32</tt>, <tt>Int64</tt>, <tt>Bits8</tt>, <tt>Bits16</tt>, <tt>Bits32</tt>, <tt>Bits64</tt>, and <tt>Double</tt>.
</t>
<t>
The "asciidoctor-idris2" must know if an implementation of the <tt>Asciidoc</tt> is available on a separate package.
These package dependencies must be added to the document header attribute ":idris2-packages:", separated by spaces or a comma.
The "contrib" and "asciidoc" packages are always added as dependencies, and so do not need to be listed in the ":idris2-packages:" attribute.
</t>
<t>
Additional packages containing implementations of the <tt>Asciidoc</tt> interface that are useful when writing an Internet-Draft will be documented in separate documents.
</t>
</section>
</section>
<section>
<name>"Xml2rfc" Module</name>
<t>
This module supplements the <tt>Asciidoc</tt> module with types that implement the AsciiDoc extensions specific to the "xml2rfc" Asciidoctor backend.
</t>
<section>
<name>Content</name>
<t>
<tt>CrossrefXml2rfc</tt> extends the <tt>Crossref</tt> content with additional attributes
</t>
<t>
<tt>LinkXml2rfc</tt> extends the <tt>Link</tt> content with additional attributes
</t>
<t>
<tt>Bcp14</tt> is an additional content.
</t>
<t>
<tt>Comment</tt> is an additional content.
</t>
<t>
<tt>Unicode</tt> is an additional content.
</t>
</section>
<section>
<name>Block</name>
<t>
<tt>ParagraphXml2rfc</tt> extends the <tt>Paragraph</tt> block with additional attributes
</t>
<t>
<tt>LiteralXml2rfc</tt> extends the <tt>Literal</tt> block with additional attributes
</t>
<t>
<tt>ImageXml2rfc</tt> extends the <tt>Image</tt> block with additional attributes
</t>
<t>
<tt>SourceXml2rfc</tt> extends the <tt>Source</tt> block with additional attributes
</t>
<t>
<tt>Alt</tt> is an additional block.
</t>
<t>
<tt>Figure</tt> is an additional block.
</t>
<t>
<tt>DefinitionListXml2rfc</tt> extends the <tt>DefinitionList</tt> block with additional attributes
</t>
<t>
<tt>OrderedListXml2rfc</tt> extends the <tt>OrderedList</tt> block with additional attributes
</t>
<t>
<tt>UnorderedListXml2rfc</tt> extends the <tt>UnorderedList</tt> block with additional attributes
</t>
</section>
<section>
<name>Top-level Section</name>
<t>
<tt>TopSection</tt> is the sum type of the possible top-level sections that compose an AsciiDoc document:
</t>
<t>
<tt>Note</tt> is an additional top-level section.
</t>
<dl spacing='compact'>
<dt><tt>AbstracTopSection</tt>: </dt><dd>An abstract section.</dd><dt><tt>NormalTopSection</tt>: </dt><dd>A section.</dd><dt><tt>BibliographyTopSection</tt>: </dt><dd>A bibliography.</dd><dt><tt>AppendixTopSection</tt>: </dt><dd>An appendix .</dd><dt><tt>IndexTopSection</tt>: </dt><dd>An index.</dd>
</dl>
</section>
<section>
<name>Document</name>
<t>
<tt>Document</tt> represents a complete AsciiDoc document.
</t>
</section>
</section>
</section>






</middle>
<back>
















<references>
<name>Informative References</name>
<reference anchor="draft-petithuguenin-xml2rfc-asciidoc" target="https://datatracker.ietf.org/doc/draft-petithuguenin-xml2rfc-asciidoc/05">
  <front>
<title>Mappings Between XML2RFC v3 and AsciiDoc</title>
<author fullname="Marc Petit-Huguenin"><address><email>marc@petit-huguenin.org</email></address></author>
<date day="28" month="Jul" year="2024"/>
</front>
  <seriesInfo name="Internet-Draft" value="draft-petithuguenin-xml2rfc-asciidoc-05"/>
</reference>
<reference anchor='Knuth92'>
  <front>
    <title>Literate Programming</title>
    <author initials='D. E.' surname='Knuth' fullname='Donald Ervin Knuth' />
    <date year='1992' month='January' day='1' />
  </front>
</reference>
<reference anchor='AsciiDoc' target='https://en.wikipedia.org/wiki/AsciiDoc/'>
  <front>
    <title>AsciiDoc</title>
    <author surname='Unknown' />
    <date year='2021' month='March' day='8' />
    <abstract>
      <t>
AsciiDoc is a human-readable document format, semantically equivalent to DocBook XML, but using plain-text mark-up conventions. AsciiDoc documents can be created using any text editor and read “as-is”, or rendered to HTML or any other format supported by a DocBook tool-chain, i.e. PDF, TeX, Unix manpages, e-books, slide presentations, etc. Common file extensions for AsciiDoc files are txt(as encouraged by AsciiDoc&apos;s creator) and adoc.
      </t>
    </abstract>
  </front>
  <refcontent>Accessed 23 April 2021</refcontent>
</reference>
<reference anchor='Asciidoctor' target='https://docs.asciidoctor.org/home/'>
  <front>
    <title>Asciidoctor Documentation Home :: Asciidoctor Docs</title>
    <author surname='Unknown' />
  </front>
  <refcontent>Accessed 23 April 2021</refcontent>
</reference>
<reference anchor='Metanorma' target='https://www.metanorma.com/'>
  <front>
    <title>Metanorma</title>
    <author initials='R.' surname='Inc' fullname='Ribose Inc' />
    <abstract>
      <t>
The standard of standards
      </t>
    </abstract>
  </front>
  <refcontent>Accessed 23 April 2021</refcontent>
</reference>
<reference anchor='Idris2' target='https://idris2.readthedocs.io/en/latest/'>
  <front>
    <title>Documentation for the Idris 2 Language — Idris2 0.0 documentation</title>
    <author surname='Unknown' />
  </front>
  <refcontent>Accessed 31 January 2023</refcontent>
</reference>
<reference anchor='LitProg' target='https://en.wikipedia.org/wiki/Literate_programming'>
  <front>
    <title>Literate programming</title>
    <author surname='Unknown' />
    <date year='2023' month='January' day='9' />
    <abstract>
      <t>
Literate programming is a programming paradigm introduced in 1984 by Donald Knuth in which a computer program is given as an explanation of how it works in a natural language, such as English, interspersed (embedded) with snippets of macros and traditional source code, from which compilable source code can be generated. The approach is used in scientific computing and in data science routinely for reproducible research and open access purposes. Literate programming tools are used by millions of programmers today.The literate programming paradigm, as conceived by Donald Knuth, represents a move away from writing computer programs in the manner and order imposed by the computer, and instead gives programmers macros to develop programs in the order demanded by the logic and flow of their thoughts. Literate programs are written as an exposition of logic in more natural language in which macros are used to hide abstractions and traditional source code, more like the text of an essay.
Literate programming (LP) tools are used to obtain two representations from a source file: one understandable by a compiler or interpreter, the &quot;tangled&quot; code, and another for viewing as formatted documentation, which is said to be &quot;woven&quot; from the literate source. While the first generation of literate programming tools were computer language-specific, the later ones are language-agnostic and exist beyond the individual programming languages.
      </t>
    </abstract>
  </front>
  <refcontent>Accessed 31 January 2023</refcontent>
</reference>
<reference anchor='RFC8489' target='https://www.rfc-editor.org/info/rfc8489'>
  <front>
    <title>Session Traversal Utilities for NAT (STUN)</title>
    <author initials='M.' surname='Petit-Huguenin' fullname='M. Petit-Huguenin' />
    <author initials='G.' surname='Salgueiro' fullname='G. Salgueiro' />
    <author initials='J.' surname='Rosenberg' fullname='J. Rosenberg' />
    <author initials='D.' surname='Wing' fullname='D. Wing' />
    <author initials='R.' surname='Mahy' fullname='R. Mahy' />
    <author initials='P.' surname='Matthews' fullname='P. Matthews' />
    <date year='2020' month='February' />
    <abstract>
      <t>
Session Traversal Utilities for NAT (STUN) is a protocol that serves as a tool for other protocols in dealing with NAT traversal. It can be used by an endpoint to determine the IP address and port allocated to it by a NAT. It can also be used to check connectivity between two endpoints and as a keep-alive protocol to maintain NAT bindings. STUN works with many existing NATs and does not require any special behavior from them. STUN is not a NAT traversal solution by itself. Rather, it is a tool to be used in the context of a NAT traversal solution. This document obsoletes RFC 5389.
      </t>
    </abstract>
  </front>
  <seriesInfo name='RFC' value='8489'/>
  <seriesInfo name='DOI' value='10.17487/RFC8489' />
</reference>

</references>
<section anchor='cli'>
<name>Installation</name>
<t>
A computerate specification can be converted into an informal specification with the "computerate" command that is distributed as a Docker image that can be built as follow:
</t>
<ul empty='true'>
<li><sourcecode><![CDATA[docker build git://shalmaneser.org/yathewEngod7#0.0 -t computerate]]></sourcecode></li>
</ul>
<t>
An AsciiDoc file can then be converted with the following command:
</t>
<ul empty='true'>
<li><sourcecode><![CDATA[docker run --rm -v $(pwd):/workspace computerate <file>]]></sourcecode></li>
</ul>
<t>
Note that only the files in the repository and sub-repositories where the command is executed are visible to that command.
That means that files or symbolic links to files outside that hierarchy cannot be used.
On the other hand external directories mounted with the "--bind" option can be used.
</t>
<t>
The "computerate" command is configured to include the following Asciidoctor add-ons:
</t>
<ul spacing='compact'>
<li>asciidoctor-xml2rfc <xref target='draft-petithuguenin-xml2rfc-asciidoc' /></li><li>asciidoctor-pdf</li><li>asciidoctor-revealjs</li><li>asciidoctor-epub3</li><li>asciidoctor-idris2 [This document]</li><li>asciidoctor-diagram</li>
</ul>
<t>
The following diagram generators are available for use by asciidoctor-diagram:
</t>
<ul spacing='compact'>
<li>actdiag</li><li>blockdiag</li><li>graphviz</li><li>nwdiag</li><li>packetdiag</li><li>plantuml</li><li>rackdiag</li><li>seqdiag</li>
</ul>
<t>
The following additional Idris2 packages are installed in the Docker image:
</t>
<ul spacing='compact'>
<li>asciidoc [This document]</li>
</ul>
</section>
<section anchor='library'>
<name>Package asciidoc</name>
<t>
An Idris2 package to generate a document, an embeddable document, or an inline document in AsciiDoc.
</t>
<dl spacing='compact'>
<dt>Version: </dt><dd>0.0</dd><dt>Author(s): </dt><dd>Marc Petit-Huguenin</dd><dt>License: </dt><dd>AGPL-3.0-or-later</dd><dt>Dependencies: </dt><dd>contrib</dd>
</dl>
<section>
<name>Module Asciidoc</name>
<t>
A module that defines types for the generic AsciiDoc syntax.
</t>
<dl newline='true'>
<dt>data Align : Type </dt><dd><t>Alignment.</t><dl newline='true'>
<dt>Left : Align </dt><dd>Left alignment.</dd><dt>Center : Align </dt><dd>Center alignment.</dd><dt>Right : Align </dt><dd>Right alignment.</dd>
</dl></dd>
</dl>
<dl newline='true'>
<dt>interface Asciidoc a</dt><dd><t>Things that have an AsciiDoc representation.</t><t>
Implemented by String, Char, Integer, Int, Int8, Int16, Int32, Int64, Bits8, Bits16, Bits32, Bits64, Double, List1.
</t>
<dl newline='true'>
<dt>contents : a&#160;-&gt; List1&#160;Content </dt><dd>Converts a value into inline AsciiDoc.</dd>
</dl>
<dl newline='true'>
<dt>blocks : a&#160;-&gt; List1&#160;Block </dt><dd>Converts a value into embedded AsciiDoc.</dd>
</dl></dd>
</dl>
<dl newline='true'>
<dt>data Block : Type </dt><dd><t>Types of blocks.</t><dl newline='true'>
<dt>ParagraphBlock : Paragraph&#160;-&gt; Block </dt><dd>A block of text.</dd><dt>LiteralBlock : Literal&#160;-&gt; Block </dt><dd>A pretty-printed block of text.</dd><dt>ImageBlock : Image&#160;-&gt; Block </dt><dd>An image.</dd><dt>SourceBlock : Source&#160;-&gt; Block </dt><dd>A pretty-printed block of source code.</dd><dt>SidebarBlock : Sidebar&#160;-&gt; Block </dt><dd>Visually separated blocks.</dd><dt>QuoteBlock : Quote&#160;-&gt; Block </dt><dd>A block of prose excerpt, quote or verse.</dd><dt>DefinitionListBlock : DefinitionList&#160;-&gt; Block </dt><dd>An association list.</dd><dt>OrderedListBlock : OrderedList&#160;-&gt; Block </dt><dd>An ordered list.</dd><dt>UnorderedListBlock : UnorderedList&#160;-&gt; Block </dt><dd>An unordered list.</dd><dt>TableBlock : Table&#160;-&gt; Block </dt><dd>A table.</dd><dt>IndexBlock : Index&#160;-&gt; Block </dt><dd>An entry in the index.</dd><dt>PassBlock : Pass&#160;-&gt; Block </dt><dd>Text that is passed directly to the backend.</dd><dt>NullBlock : Block </dt><dd></dd><dt>OtherBlock : Renderer&#160;a&#160;=&gt; a&#160;-&gt; Block </dt><dd>Extended block.</dd>
</dl></dd>
</dl>
<dl newline='true'>
<dt>data Content : Type </dt><dd><t>Types of inline content.</t><dl newline='true'>
<dt>TextContent : String&#160;-&gt; Content </dt><dd>Plain text content.</dd><dt>BreakContent : Content </dt><dd>An hard line break.</dd><dt>ItalicContent : List&#160;Content&#160;-&gt; Content </dt><dd>Italicized content.</dd><dt>LinkContent : Link&#160;-&gt; Content </dt><dd>An hyperlink.</dd><dt>IndexContent : Index&#160;-&gt; Content </dt><dd>An entry in the index.</dd><dt>BoldContent : List&#160;Content&#160;-&gt; Content </dt><dd>Bold content.</dd><dt>SubscriptContent : List&#160;Content&#160;-&gt; Content </dt><dd>Subscript content.</dd><dt>SuperscriptContent : List&#160;Content&#160;-&gt; Content </dt><dd>Superscript content.</dd><dt>MonospaceContent : List&#160;Content&#160;-&gt; Content </dt><dd>Monospaced content.</dd><dt>CrossrefContent : Crossref&#160;-&gt; Content </dt><dd>A cross-reference to another part of the document.</dd><dt>PassContent : String&#160;-&gt; Content </dt><dd>Text that is passed directly to the backend.</dd><dt>OtherContent : Renderer&#160;a&#160;=&gt; a&#160;-&gt; Content </dt><dd>Extended content.</dd>
</dl></dd>
</dl>
<dl newline='true'>
<dt>record Crossref  </dt><dd><t>A cross-reference content.</t><dl newline='true'>
<dt>MkCrossref: </dt><dd><t>(target&#160;:&#160;String)&#160;-&gt; (content&#160;:&#160;List&#160;Content)&#160;-&gt; Crossref</t><dl spacing='compact'>
<dt>target: </dt><dd>An identifier for the target of the cross-reference.</dd><dt>content: </dt><dd>The text for the cross-reference.</dd>
</dl></dd>
</dl></dd>
</dl>
<dl newline='true'>
<dt>record DefinitionList  </dt><dd><t>A definitition list.</t><dl newline='true'>
<dt>MkDefinitionList: </dt><dd><t>(id&#160;:&#160;Maybe&#160;String)&#160;-&gt; (content&#160;:&#160;List1&#160;(DefinitionTerm,&#160;Item))&#160;-&gt; DefinitionList</t><dl spacing='compact'>
<dt>id: </dt><dd>Identifier.</dd><dt>content: </dt><dd>A non-empty list of definition term.</dd>
</dl></dd>
</dl></dd>
</dl>
<dl newline='true'>
<dt>record DefinitionTerm  </dt><dd><t>A definition term.</t><dl newline='true'>
<dt>MkDefinitionTerm: </dt><dd><t>(id&#160;:&#160;Maybe&#160;String)&#160;-&gt; (content&#160;:&#160;List&#160;Content)&#160;-&gt; DefinitionTerm</t><dl spacing='compact'>
<dt>id: </dt><dd>Identifier.</dd><dt>content: </dt><dd>List of content.</dd>
</dl></dd>
</dl></dd>
</dl>
<dl newline='true'>
<dt>record Image  </dt><dd><t>An image.</t><dl newline='true'>
<dt>MkImage: </dt><dd><t>(align&#160;:&#160;Maybe&#160;Align)&#160;-&gt; (alt&#160;:&#160;Maybe&#160;String)&#160;-&gt; (id&#160;:&#160;Maybe&#160;String)&#160;-&gt; (src&#160;:&#160;String)&#160;-&gt; Image</t><dl spacing='compact'>
<dt>align: </dt><dd>Alignment.</dd><dt>alt: </dt><dd>Alternate description.</dd><dt>id: </dt><dd>Identifier.</dd><dt>src: </dt><dd>SVG source.</dd>
</dl></dd>
</dl></dd>
</dl>
<dl newline='true'>
<dt>record Index  </dt><dd><t>An index term content</t><dl newline='true'>
<dt>MkIndex: </dt><dd><t>(item&#160;:&#160;String)&#160;-&gt; (primary&#160;:&#160;Maybe&#160;())&#160;-&gt; (subitem&#160;:&#160;Maybe&#160;String)&#160;-&gt; Index</t><dl spacing='compact'>
<dt>item: </dt><dd>The primary term.</dd><dt>subitem: </dt><dd>The secondary term.</dd>
</dl></dd>
</dl></dd>
</dl>
<dl newline='true'>
<dt>record Item  </dt><dd><t>A list or table cell.</t><dl newline='true'>
<dt>MkItem: </dt><dd><t>(id&#160;:&#160;Maybe&#160;String)&#160;-&gt; (ref&#160;:&#160;Maybe&#160;String)&#160;-&gt; (align&#160;:&#160;Maybe&#160;Align)&#160;-&gt; (colspan&#160;:&#160;Maybe&#160;Nat)&#160;-&gt; (rowspan&#160;:&#160;Maybe&#160;Nat)&#160;-&gt; (content&#160;:&#160;Either&#160;(List1&#160;Block)&#160;(List&#160;Content))&#160;-&gt; Item</t><dl spacing='compact'>
<dt>id: </dt><dd>Identifier.</dd><dt>align: </dt><dd>Alignment.</dd><dt>content: </dt><dd>Either a non-empty list of blocks or a list of content.</dd>
</dl></dd>
</dl></dd>
</dl>
<dl newline='true'>
<dt>record Link  </dt><dd><t>A link content.</t><dl newline='true'>
<dt>MkLink: </dt><dd><t>(target&#160;:&#160;String)&#160;-&gt; (content&#160;:&#160;String)&#160;-&gt; Link</t><dl spacing='compact'>
<dt>target: </dt><dd>A URL.</dd><dt>content: </dt><dd>The text for the link.</dd>
</dl></dd>
</dl></dd>
</dl>
<dl newline='true'>
<dt>record Literal  </dt><dd><t>Literal.</t><dl newline='true'>
<dt>MkLiteral: </dt><dd><t>(id&#160;:&#160;Maybe&#160;String)&#160;-&gt; (style&#160;:&#160;Maybe&#160;String)&#160;-&gt; (content&#160;:&#160;Doc&#160;())&#160;-&gt; Literal</t><dl spacing='compact'>
<dt>id: </dt><dd>Identifier.</dd><dt>style: </dt><dd>Style.</dd><dt>content: </dt><dd>Pretty-printable content.</dd>
</dl></dd>
</dl></dd>
</dl>
<dl newline='true'>
<dt>data Marker : Type </dt><dd><t>Unordered list label style.</t><dl newline='true'>
<dt>Circle : Marker </dt><dd>Symbol.</dd><dt>NoBullet : Marker </dt><dd>No symbol, but indented.</dd><dt>Unstyled : Marker </dt><dd>No symbol, but not indented.</dd>
</dl></dd>
</dl>
<dl newline='true'>
<dt>data NumberType : Type </dt><dd><t>Ordered list label type.</t><dl newline='true'>
<dt>Lowercase : NumberType </dt><dd>Lower case alphabetic.</dd><dt>Uppercase : NumberType </dt><dd>Upper case alphabetic.</dd><dt>Decimal : NumberType </dt><dd>Decimal numbers.</dd><dt>LowercaseRoman : NumberType </dt><dd>Lower case roman numeral.</dd><dt>UppercaseRoman : NumberType </dt><dd>Upper case roman numeral.</dd>
</dl></dd>
</dl>
<dl newline='true'>
<dt>record OrderedList  </dt><dd><t>An ordered list.</t><dl newline='true'>
<dt>MkOrderedList: </dt><dd><t>(id&#160;:&#160;Maybe&#160;String)&#160;-&gt; (group&#160;:&#160;Maybe&#160;String)&#160;-&gt; (start&#160;:&#160;Maybe&#160;Nat)&#160;-&gt; (type&#160;:&#160;Maybe&#160;NumberType)&#160;-&gt; (content&#160;:&#160;List1&#160;Item)&#160;-&gt; OrderedList</t><dl spacing='compact'>
<dt>id: </dt><dd>Identifier.</dd><dt>group: </dt><dd>Numbering group.</dd><dt>start: </dt><dd>Numbering start.</dd><dt>type: </dt><dd>Labels type.</dd><dt>content: </dt><dd>A non-empty list of items.</dd>
</dl></dd>
</dl></dd>
</dl>
<dl newline='true'>
<dt>record Paragraph  </dt><dd><t>A paragraph.</t><dl newline='true'>
<dt>MkParagraph: </dt><dd><t>(id&#160;:&#160;Maybe&#160;String)&#160;-&gt; (content&#160;:&#160;List&#160;Content)&#160;-&gt; Paragraph</t><dl spacing='compact'>
<dt>id: </dt><dd>Identifier.</dd><dt>content: </dt><dd>The list of content.</dd>
</dl></dd>
</dl></dd>
</dl>
<dl newline='true'>
<dt>record Pass  </dt><dd><t>Passthrough.</t><dl newline='true'>
<dt>MkPass: </dt><dd><t>(id&#160;:&#160;Maybe&#160;String)&#160;-&gt; (content&#160;:&#160;String)&#160;-&gt; Pass</t><dl spacing='compact'>
<dt>id: </dt><dd>Identifier.</dd><dt>content: </dt><dd>Text passed through.</dd>
</dl></dd>
</dl></dd>
</dl>
<dl newline='true'>
<dt>record Quote  </dt><dd><t>A quote.</t><dl newline='true'>
<dt>MkQuote: </dt><dd><t>(id&#160;:&#160;Maybe&#160;String)&#160;-&gt; (cite&#160;:&#160;Maybe&#160;String)&#160;-&gt; (quotedFrom&#160;:&#160;Maybe&#160;String)&#160;-&gt; (content&#160;:&#160;Either&#160;(List1&#160;Block)&#160;(List1&#160;Content))&#160;-&gt; Quote</t><dl spacing='compact'>
<dt>id: </dt><dd>Identifier.</dd><dt>cite: </dt><dd>Source of the citation.</dd><dt>quotedFrom: </dt><dd>Origin of the quote.</dd><dt>content: </dt><dd>Either a non-empty list of blocks or a non-empty list of content.</dd>
</dl></dd>
</dl></dd>
</dl>
<dl newline='true'>
<dt>record Row  </dt><dd><t>A table row.</t><dl newline='true'>
<dt>MkRow: </dt><dd><t>(id&#160;:&#160;Maybe&#160;String)&#160;-&gt; (content&#160;:&#160;List1&#160;(Either&#160;Item&#160;Item))&#160;-&gt; Row</t><dl spacing='compact'>
<dt>id: </dt><dd>Identifier.</dd><dt>content: </dt><dd>A non-empty list of items.</dd>
</dl></dd>
</dl></dd>
</dl>
<dl newline='true'>
<dt>record Sidebar  </dt><dd><t>A sidebar,</t><dl newline='true'>
<dt>MkSidebar: </dt><dd><t>(id&#160;:&#160;Maybe&#160;String)&#160;-&gt; (content&#160;:&#160;List&#160;Block)&#160;-&gt; Sidebar</t><dl spacing='compact'>
<dt>id: </dt><dd>Identifier.</dd><dt>content: </dt><dd>List of blocks.</dd>
</dl></dd>
</dl></dd>
</dl>
<dl newline='true'>
<dt>record Source  </dt><dd><dl newline='true'>
<dt>MkSource: </dt><dd>(id&#160;:&#160;Maybe&#160;String)&#160;-&gt; (type&#160;:&#160;Maybe&#160;String)&#160;-&gt; (content&#160;:&#160;Doc&#160;())&#160;-&gt; Source</dd>
</dl></dd>
</dl>
<dl newline='true'>
<dt>record Table  </dt><dd><t>A table.</t><dl newline='true'>
<dt>MkTable: </dt><dd><t>(id&#160;:&#160;Maybe&#160;String)&#160;-&gt; (title&#160;:&#160;Maybe&#160;(List&#160;Content))&#160;-&gt; (align&#160;:&#160;Maybe&#160;Align)&#160;-&gt; (head&#160;:&#160;Maybe&#160;(List1&#160;Row))&#160;-&gt; (body&#160;:&#160;List1&#160;Row)&#160;-&gt; (foot&#160;:&#160;Maybe&#160;(List1&#160;Row))&#160;-&gt; Table</t><dl spacing='compact'>
<dt>id: </dt><dd>Identifier.</dd><dt>title: </dt><dd>Title.</dd><dt>align: </dt><dd>Alignment.</dd><dt>head: </dt><dd>An non-empty list of rows for the header.</dd><dt>body: </dt><dd>An non-empty list of rows.</dd><dt>foot: </dt><dd>An non-empty list of rows for the footer.</dd>
</dl></dd>
</dl></dd>
</dl>
<dl newline='true'>
<dt>record UnorderedList  </dt><dd><t>An unordered list.</t><dl newline='true'>
<dt>MkUnorderedList: </dt><dd><t>(id&#160;:&#160;Maybe&#160;String)&#160;-&gt; (title&#160;:&#160;Maybe&#160;(List&#160;Content))&#160;-&gt; (marker&#160;:&#160;Marker)&#160;-&gt; (content&#160;:&#160;List1&#160;Item)&#160;-&gt; UnorderedList</t><dl spacing='compact'>
<dt>id: </dt><dd>Identifier.</dd><dt>title: </dt><dd>Title.</dd><dt>marker: </dt><dd>Type of symbol.</dd><dt>content: </dt><dd>A non-empty list of items.</dd>
</dl></dd>
</dl></dd>
</dl>
<dl newline='true'>
<dt>blocks' : {ty&#160;:&#160;Type}&#160;-&gt; (v&#160;:&#160;ty)&#160;-&gt; Name&#160;-&gt; Elab&#160;(List1&#160;Block) </dt><dd></dd>
</dl>
<dl newline='true'>
<dt>contents' : {ty&#160;:&#160;Type}&#160;-&gt; (v&#160;:&#160;ty)&#160;-&gt; Name&#160;-&gt; Elab&#160;(List1&#160;Content) </dt><dd></dd>
</dl>
<dl newline='true'>
<dt>renderBlocks : List1&#160;Block&#160;-&gt; String </dt><dd>Converts a non-empty list of Block into an embeddable AsciiDoc fragment.</dd>
</dl>
<dl newline='true'>
<dt>renderContents : List1&#160;Content&#160;-&gt; String </dt><dd>Converts a non-empty list of Content into an inline AsciiDoc fragment.</dd>
</dl>
</section>
<section>
<name>Module Asciidoc.Xml2rfc</name>
<t>
A Module that defines types for the AsciiDoc extensions of the "xml2rfc" back-end.
</t>
<dl newline='true'>
<dt>record Abstract  </dt><dd><dl newline='true'>
<dt>MkAbstract: </dt><dd>(id&#160;:&#160;Maybe&#160;String)&#160;-&gt; (title&#160;:&#160;Maybe&#160;(List&#160;Content))&#160;-&gt; (blocks&#160;:&#160;List&#160;Block)&#160;-&gt; Abstract</dd>
</dl></dd>
</dl>
<dl newline='true'>
<dt>record Alt  </dt><dd><dl newline='true'>
<dt>MkAlt: </dt><dd>(id&#160;:&#160;Maybe&#160;String)&#160;-&gt; (content&#160;:&#160;List1&#160;Block)&#160;-&gt; Alt</dd>
</dl></dd>
</dl>
<dl newline='true'>
<dt>record Appendix  </dt><dd><dl newline='true'>
<dt>MkAppendix: </dt><dd>(id&#160;:&#160;Maybe&#160;String)&#160;-&gt; (title&#160;:&#160;Maybe&#160;(List&#160;Content))&#160;-&gt; (notNumbered&#160;:&#160;Maybe&#160;())&#160;-&gt; (removeInRfc&#160;:&#160;Maybe&#160;())&#160;-&gt; (toc&#160;:&#160;Maybe&#160;Bool)&#160;-&gt; (blocks&#160;:&#160;List&#160;Block)&#160;-&gt; (sections&#160;:&#160;List&#160;Section)&#160;-&gt; Appendix</dd>
</dl></dd>
</dl>
<dl newline='true'>
<dt>record Bcp14  </dt><dd><dl newline='true'>
<dt>MkBcp14: </dt><dd>(content&#160;:&#160;String)&#160;-&gt; Bcp14</dd>
</dl></dd>
</dl>
<dl newline='true'>
<dt>record Bibliography  </dt><dd><dl newline='true'>
<dt>MkBibliography: </dt><dd>(id&#160;:&#160;Maybe&#160;String)&#160;-&gt; (title&#160;:&#160;Maybe&#160;(List&#160;Content))&#160;-&gt; (blocks&#160;:&#160;List&#160;Block)&#160;-&gt; Bibliography</dd>
</dl></dd>
</dl>
<dl newline='true'>
<dt>data Category : Type </dt><dd><t>Intended category.</t><dl newline='true'>
<dt>StdCategory : Category </dt><dd>Standard category.</dd><dt>BcpCategory : Category </dt><dd>BCP category.</dd><dt>ExpCategory : Category </dt><dd>Experimental category.</dd><dt>InfoCategory : Category </dt><dd>Informational category.</dd><dt>HistoricCategory : Category </dt><dd>Historic category.</dd>
</dl></dd>
</dl>
<dl newline='true'>
<dt>record Comment  </dt><dd><dl newline='true'>
<dt>MkComment: </dt><dd>(id&#160;:&#160;Maybe&#160;String)&#160;-&gt; (noDisplay&#160;:&#160;Maybe&#160;())&#160;-&gt; (source&#160;:&#160;Maybe&#160;String)&#160;-&gt; (content&#160;:&#160;List&#160;Content)&#160;-&gt; Comment</dd>
</dl></dd>
</dl>
<dl newline='true'>
<dt>record CrossrefXml2rfc  </dt><dd><dl newline='true'>
<dt>MkCrossrefXml2rfc: </dt><dd>(target&#160;:&#160;String)&#160;-&gt; (format&#160;:&#160;Maybe&#160;Format)&#160;-&gt; (relative&#160;:&#160;Maybe&#160;String)&#160;-&gt; (section&#160;:&#160;Maybe&#160;String)&#160;-&gt; (sectionFormat&#160;:&#160;Maybe&#160;SectionFormat)&#160;-&gt; (content&#160;:&#160;List&#160;Content)&#160;-&gt; CrossrefXml2rfc</dd>
</dl></dd>
</dl>
<dl newline='true'>
<dt>record DefinitionListXml2rfc  </dt><dd><dl newline='true'>
<dt>MkDefinitionListXml2rfc: </dt><dd>(id&#160;:&#160;Maybe&#160;String)&#160;-&gt; (indent&#160;:&#160;Maybe&#160;Nat)&#160;-&gt; (newline&#160;:&#160;Maybe&#160;())&#160;-&gt; (compactSpacing&#160;:&#160;Maybe&#160;())&#160;-&gt; (content&#160;:&#160;List1&#160;(DefinitionTerm,&#160;Item))&#160;-&gt; DefinitionListXml2rfc</dd>
</dl></dd>
</dl>
<dl newline='true'>
<dt>record Document  </dt><dd><dl newline='true'>
<dt>MkDocument: </dt><dd>(title&#160;:&#160;String)&#160;-&gt; (abbrev&#160;:&#160;Maybe&#160;String)&#160;-&gt; (category&#160;:&#160;Category)&#160;-&gt; (consensus&#160;:&#160;Maybe&#160;())&#160;-&gt; (docName&#160;:&#160;Maybe&#160;String)&#160;-&gt; (ipr&#160;:&#160;Maybe&#160;Ipr)&#160;-&gt; (obsoletes&#160;:&#160;Maybe&#160;String)&#160;-&gt; (sortRefs&#160;:&#160;Maybe&#160;())&#160;-&gt; (submissionType&#160;:&#160;Maybe&#160;Submission)&#160;-&gt; (noSymRefs&#160;:&#160;Maybe&#160;())&#160;-&gt; (tocDepth&#160;:&#160;Maybe&#160;Nat)&#160;-&gt; (noTocInclude&#160;:&#160;Maybe&#160;())&#160;-&gt; (updates&#160;:&#160;Maybe&#160;String)&#160;-&gt; (sections&#160;:&#160;List&#160;TopSection)&#160;-&gt; Document</dd>
</dl></dd>
</dl>
<dl newline='true'>
<dt>record Figure  </dt><dd><dl newline='true'>
<dt>MkFigure: </dt><dd>(id&#160;:&#160;Maybe&#160;String)&#160;-&gt; (name&#160;:&#160;List&#160;Content)&#160;-&gt; (content&#160;:&#160;List1&#160;Block)&#160;-&gt; Figure</dd>
</dl></dd>
</dl>
<dl newline='true'>
<dt>data Format : Type </dt><dd><t>Crossref format.</t><t>
Implements Show.
</t>
<dl newline='true'>
<dt>TitleFormat : Format </dt><dd>Title format.</dd><dt>CounterFormat : Format </dt><dd>Counter format.</dd><dt>NoneFormat : Format </dt><dd>No format.</dd>
</dl></dd>
</dl>
<dl newline='true'>
<dt>record ImageXml2rfc  </dt><dd><dl newline='true'>
<dt>MkImageXml2rfc: </dt><dd>(align&#160;:&#160;Maybe&#160;Align)&#160;-&gt; (alt&#160;:&#160;Maybe&#160;String)&#160;-&gt; (id&#160;:&#160;Maybe&#160;String)&#160;-&gt; (src&#160;:&#160;String)&#160;-&gt; (type&#160;:&#160;Maybe&#160;String)&#160;-&gt; (top&#160;:&#160;Maybe&#160;())&#160;-&gt; (bottom&#160;:&#160;Maybe&#160;())&#160;-&gt; (content&#160;:&#160;String)&#160;-&gt; ImageXml2rfc</dd>
</dl></dd>
</dl>
<dl newline='true'>
<dt>data Ipr : Type </dt><dd><t>Intellectual Property Rights.</t><dl newline='true'>
<dt>Trust200902Ipr : Ipr </dt><dd></dd><dt>NoModificationTrust200902Ipr : Ipr </dt><dd></dd><dt>NoDerivativesTrust200902Ipr : Ipr </dt><dd></dd><dt>Pre5378Trust200902Ipr : Ipr </dt><dd></dd><dt>Trust200811Ipr : Ipr </dt><dd></dd><dt>NoModificationTrust200811Ipr : Ipr </dt><dd></dd><dt>NoDerivativesTrust200811Ipr : Ipr </dt><dd></dd><dt>Full3978Ipr : Ipr </dt><dd></dd><dt>NoModification3978Ipr : Ipr </dt><dd></dd><dt>NoDerivatives3978Ipr : Ipr </dt><dd></dd><dt>Full3667Ipr : Ipr </dt><dd></dd><dt>NoModification3667Ipr : Ipr </dt><dd></dd><dt>NoDerivatives3667Ipr : Ipr </dt><dd></dd><dt>Full2026Ipr : Ipr </dt><dd></dd><dt>NoDerivativeWorks2026Ipr : Ipr </dt><dd></dd><dt>None : Ipr </dt><dd></dd>
</dl></dd>
</dl>
<dl newline='true'>
<dt>record LinkXml2rfc  </dt><dd><dl newline='true'>
<dt>MkLinkXml2rfc: </dt><dd>(angleBrackets&#160;:&#160;Maybe&#160;())&#160;-&gt; (target&#160;:&#160;String)&#160;-&gt; (content&#160;:&#160;String)&#160;-&gt; LinkXml2rfc</dd>
</dl></dd>
</dl>
<dl newline='true'>
<dt>record LiteralXml2rfc  </dt><dd><dl newline='true'>
<dt>MkLiteralXml2rfc: </dt><dd>(align&#160;:&#160;Maybe&#160;Align)&#160;-&gt; (style&#160;:&#160;Maybe&#160;String)&#160;-&gt; (alt&#160;:&#160;Maybe&#160;String)&#160;-&gt; (id&#160;:&#160;Maybe&#160;String)&#160;-&gt; (name&#160;:&#160;Maybe&#160;String)&#160;-&gt; (type&#160;:&#160;Maybe&#160;String)&#160;-&gt; (top&#160;:&#160;Maybe&#160;String)&#160;-&gt; (bottom&#160;:&#160;Maybe&#160;String)&#160;-&gt; (content&#160;:&#160;Doc&#160;())&#160;-&gt; LiteralXml2rfc</dd>
</dl></dd>
</dl>
<dl newline='true'>
<dt>record Note  </dt><dd><dl newline='true'>
<dt>MkNote: </dt><dd>(id&#160;:&#160;Maybe&#160;String)&#160;-&gt; (title&#160;:&#160;Maybe&#160;(List&#160;Content))&#160;-&gt; (blocks&#160;:&#160;List&#160;Block)&#160;-&gt; Note</dd>
</dl></dd>
</dl>
<dl newline='true'>
<dt>record OrderedListXml2rfc  </dt><dd><dl newline='true'>
<dt>MkOrderedListXml2rfc: </dt><dd>(id&#160;:&#160;Maybe&#160;String)&#160;-&gt; (group&#160;:&#160;Maybe&#160;String)&#160;-&gt; (indent&#160;:&#160;Maybe&#160;Nat)&#160;-&gt; (compactSpacing&#160;:&#160;Maybe&#160;())&#160;-&gt; (start&#160;:&#160;Maybe&#160;Nat)&#160;-&gt; (type&#160;:&#160;Maybe&#160;(NumberType,&#160;Maybe&#160;(String,&#160;String)))&#160;-&gt; (content&#160;:&#160;List1&#160;Item)&#160;-&gt; OrderedListXml2rfc</dd>
</dl></dd>
</dl>
<dl newline='true'>
<dt>record ParagraphXml2rfc  </dt><dd><dl newline='true'>
<dt>MkParagraphXml2rfc: </dt><dd>(id&#160;:&#160;Maybe&#160;String)&#160;-&gt; (indent&#160;:&#160;Maybe&#160;Nat)&#160;-&gt; (keepWithNext&#160;:&#160;Maybe&#160;())&#160;-&gt; (keepWithPrevious&#160;:&#160;Maybe&#160;())&#160;-&gt; (content&#160;:&#160;List&#160;Content)&#160;-&gt; ParagraphXml2rfc</dd>
</dl></dd>
</dl>
<dl newline='true'>
<dt>record Section  </dt><dd><dl newline='true'>
<dt>MkSection: </dt><dd>(id&#160;:&#160;Maybe&#160;String)&#160;-&gt; (title&#160;:&#160;Maybe&#160;(List&#160;Content))&#160;-&gt; (notNumbered&#160;:&#160;Maybe&#160;())&#160;-&gt; (removeInRfc&#160;:&#160;Maybe&#160;())&#160;-&gt; (toc&#160;:&#160;Maybe&#160;Bool)&#160;-&gt; (blocks&#160;:&#160;List&#160;Block)&#160;-&gt; (sections&#160;:&#160;List&#160;Section)&#160;-&gt; Section</dd>
</dl></dd>
</dl>
<dl newline='true'>
<dt>data SectionFormat : Type </dt><dd><t>External reference format.</t><t>
Implements Show.
</t>
<dl newline='true'>
<dt>CommaSectionFormat : SectionFormat </dt><dd>Comma as separator.</dd><dt>ParensSectionFormat : SectionFormat </dt><dd>Parentheses as separator.</dd><dt>BareSectionFormat : SectionFormat </dt><dd>Same link withing parentheses.</dd>
</dl></dd>
</dl>
<dl newline='true'>
<dt>record SourceXml2rfc  </dt><dd><dl newline='true'>
<dt>MkSourceXml2rfc: </dt><dd>(id&#160;:&#160;Maybe&#160;String)&#160;-&gt; (markers&#160;:&#160;Maybe&#160;())&#160;-&gt; (name&#160;:&#160;Maybe&#160;String)&#160;-&gt; (type&#160;:&#160;Maybe&#160;String)&#160;-&gt; (top&#160;:&#160;Maybe&#160;String)&#160;-&gt; (bottom&#160;:&#160;Maybe&#160;String)&#160;-&gt; (content&#160;:&#160;Doc&#160;())&#160;-&gt; SourceXml2rfc</dd>
</dl></dd>
</dl>
<dl newline='true'>
<dt>data Submission : Type </dt><dd><t>Intended stream.</t><dl newline='true'>
<dt>IetfSubmission : Submission </dt><dd>IETF stream.</dd><dt>IabSubmission : Submission </dt><dd>IAB stream.</dd><dt>IrtfSubmission : Submission </dt><dd>IRTF stream.</dd><dt>IndependentSubmission : Submission </dt><dd>Independent stream.</dd><dt>EditorialSubmission : Submission </dt><dd>Editorial stream.</dd>
</dl></dd>
</dl>
<dl newline='true'>
<dt>data TopSection : Type </dt><dd><t>Types of top sections.</t><dl newline='true'>
<dt>AbstractTopSection : Abstract&#160;-&gt; TopSection </dt><dd>The abstract.</dd><dt>NormalTopSection : Section&#160;-&gt; TopSection </dt><dd>A section.</dd><dt>BibliographyTopSection : Bibliography&#160;-&gt; TopSection </dt><dd>A bibliography.</dd><dt>AppendixTopSection : Appendix&#160;-&gt; TopSection </dt><dd>An appendix.</dd><dt>IndexTopSection : TopSection </dt><dd>The index.</dd><dt>OtherTopSection : Renderer&#160;a&#160;=&gt; a&#160;-&gt; TopSection </dt><dd>Extended top-level section.</dd>
</dl></dd>
</dl>
<dl newline='true'>
<dt>record Unicode  </dt><dd><dl newline='true'>
<dt>MkUnicode: </dt><dd>(id&#160;:&#160;Maybe&#160;String)&#160;-&gt; (ascii&#160;:&#160;Maybe&#160;String)&#160;-&gt; (format&#160;:&#160;Maybe&#160;String)&#160;-&gt; (content&#160;:&#160;String)&#160;-&gt; Unicode</dd>
</dl></dd>
</dl>
<dl newline='true'>
<dt>record UnorderedListXml2rfc  </dt><dd><dl newline='true'>
<dt>MkUnorderedListXml2rfc: </dt><dd>(id&#160;:&#160;Maybe&#160;String)&#160;-&gt; (title&#160;:&#160;Maybe&#160;(List&#160;Content))&#160;-&gt; (marker&#160;:&#160;Marker)&#160;-&gt; (indent&#160;:&#160;Maybe&#160;Nat)&#160;-&gt; (compactSpacing&#160;:&#160;Maybe&#160;())&#160;-&gt; (content&#160;:&#160;List1&#160;Item)&#160;-&gt; UnorderedListXml2rfc</dd>
</dl></dd>
</dl>
<dl newline='true'>
<dt>renderDocument : (d&#160;:&#160;Document)&#160;-&gt; String </dt><dd><t>Converts a Document into an Asciidoc document.</t><dl spacing='compact'>
<dt>d: </dt><dd>the document.</dd>
</dl></dd>
</dl>
<dl newline='true'>
<dt>renderSection : Nat&#160;-&gt; Section&#160;-&gt; String </dt><dd></dd>
</dl>
</section>
</section>
<section anchor='ack' numbered='false'>
<name>Acknowledgements</name>
<t>
No technology that cannot explain its own results (LLM, AI/ML) have been involved in the creation of this document or its associated tooling.
</t>
</section>
<section anchor='contrib' numbered='false'>
<name>Contributors</name>
<contact asciiFullname="Stephane Bryant" fullname="Stéphane Bryant">
  <address>
    <email>stephane.ml.bryant@gmail.com</email>
  </address>
</contact>

<t>
Stephane is a co-founder of the Nephelion project, project that started back in 2014 during a week-end visiting national parks in Utah.
Computerate Specifying is the successor of this project, and it could not have been done without the frequent reviews and video calls with Stephane during these last 10 years.
</t>
</section>
<section anchor='changelog' numbered='false' removeInRFC='true'>
<name>Changelog</name>
<dl>
<dt>Since draft-petithuguenin-computerate-specification-02: </dt><dd><ul spacing='compact'>
<li><t>Document:</t><ul spacing='compact'>
<li>Update</li>
</ul></li>
</ul></dd>
</dl>
<dl>
<dt>Since draft-petithuguenin-computerate-specification-01: </dt><dd><ul spacing='compact'>
<li><t>Document:</t><ul spacing='compact'>
<li>Update</li>
</ul></li>
</ul></dd>
</dl>
<dl>
<dt>Since draft-petithuguenin-computerate-specification-00: </dt><dd><ul spacing='compact'>
<li><t>Document:</t><ul spacing='compact'>
<li>Nits</li>
</ul></li><li><t>Tooling:</t><ul spacing='compact'>
<li>Patched Idris2 with support for external IdrisDoc generation (docgen) extension.</li>
</ul></li>
</ul></dd>
</dl>
<dl>
<dt>Since draft-petithuguenin-computerate-specifying-17: </dt><dd><ul spacing='compact'>
<li><t>Document:</t><ul spacing='compact'>
<li>Nits</li><li>Add explanations for IdrisDoc generation.</li><li>Add explanations for ":idris2-packages:" header attribute.</li>
</ul></li><li><t>Tooling:</t><ul spacing='compact'>
<li>Patched Idris2 with support for external IdrisDoc generation (docgen) extension.</li><li>Add Asciidoc docgen implementation.</li><li>Add support for including a ipkg file to generate and include the generated IdrisDoc as an AsciiDoc section.</li><li>The content of the ":idris2-packages:" header attribute is passed to the idris2 instance.</li>
</ul></li>
</ul></dd>
</dl>
</section>
</back>
</rfc>
