File tree Expand file tree Collapse file tree 4 files changed +9
-9
lines changed Expand file tree Collapse file tree 4 files changed +9
-9
lines changed Original file line number Diff line number Diff line change 22||| the descriptions and their in-memory representation. This closely matches
33||| the current implementation of format descriptions in Fathom.
44|||
5- ||| [Induction recusion ](https://en.wikipedia.org/wiki/Induction-recursion) is
5+ ||| [Induction recursion ](https://en.wikipedia.org/wiki/Induction-recursion) is
66||| where an inductive datatype is defined simultaneously with a function that
77||| operates on that type (see the @Format and @Rep definitions below).
88|||
99||| The universe is ‘closed’ in the sense tha new format descriptions cannot be
1010||| added to the type theory, although they can be composed out of other formats)
1111|||
1212||| This is similar to the approach used when defining type theories with
13- ||| Tarski-style universes. In-fact inductive-recusrive datatypes as a language
13+ ||| Tarski-style universes. In-fact inductive-recursive datatypes as a language
1414||| feature were apparently originally motivated by this use case (see: [“A
1515||| General Formulation of Simultaneous Inductive-Recursive Definitions in Type
1616||| Theory”](https://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.6.4575) by
Original file line number Diff line number Diff line change 1- ||| Experimenting with an approach to extending inductive-recusive format
1+ ||| Experimenting with an approach to extending inductive-recursive format
22||| descriptions with custom formats.
33
44module Fathom.Closed.InductiveRecursiveCustom
@@ -18,7 +18,7 @@ import Fathom.Base
1818||| A custom format description.
1919|||
2020||| We’d prefer to just import `Fathom.Open.Record`, but Idris’ imports are a
21- ||| bit tempramental and result in ambiguities when importing modules that
21+ ||| bit temperamental and result in ambiguities when importing modules that
2222||| contain types of the same name as those defined in the current module.
2323public export
2424record CustomFormat where
Original file line number Diff line number Diff line change 11||| Open format universe
22|||
33||| This module defines an open universe of binary format descriptions using
4- ||| records to define an inderface . By defining formats in this way, the
4+ ||| records to define an interface . By defining formats in this way, the
55||| universe of formats is open to extension.
66|||
7- ||| I’m not sure, but this reminds me a little of the ‘coinductive universes’
8- ||| that [some type theorists were proposing for HoTT ](https://www.cmu.edu/dietrich/philosophy/hott/slides/shulman-2022-05-12.pdf#page=79),
7+ ||| I’m not sure, but this reminds me a little of the ‘coinductively defined
8+ ||| universes’ that [some type theorists were proposing](https://www.cmu.edu/dietrich/philosophy/hott/slides/shulman-2022-05-12.pdf#page=79),
99||| but I may be mistaken.
1010
1111module Fathom.Open.Record
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ import Fathom.Open.Record as Record
1313-- Experiment with converting between the different styles of format universes
1414
1515
16- ||| Convert an inductive-recusive format universe into a record format
16+ ||| Convert an inductive-recursive format universe into a record format
1717public export
1818format : IndRec.Format -> Record.Format
1919format f = Record . MkFormat
@@ -23,7 +23,7 @@ format f = Record.MkFormat
2323 }
2424
2525
26- ||| Conver an indexed-inductive format universe into a record format
26+ ||| Convert an indexed-inductive format universe into a record format
2727public export
2828formatOf : {Rep : Type } -> Indexed.FormatOf Rep -> Record.Format
2929formatOf f = Record . MkFormat
You can’t perform that action at this time.
0 commit comments