Skip to content

Universe of codes for mutually-recursive families of types #10

@wires

Description

@wires

The work "Type-safe diff for families of datatypes" is able to generically compute diffs for all kinds of data types.

https://www.andres-loeh.de/GDiff.html

Most generic programming libraries use a generic view to represent the structure of a datatype [Holdermans et al., 2006]. The sum of products in, for example, Extensible and Modular Generics
for the Masses
[Oliveira et al., 2006] allows functions to be defined by induction on the structure. A fixed point representation such as Multirec’s [Rodriguez et al., 2009] enables access to the recursive
structure of a family (or system) of types. Defining a generic view in Haskell is closely related to constructing a universe in type theory and dependently typed programming.
A universe consists of a datatype of codes and an interpretation function that maps codes to types [Benke et al., 2003, Morris, 2007]. Functions can then be defined by induction on the codes.

At the moment we are not interested in the patch/diffing (although there are various interesting connections to p2p-consensus), but in their "universe".

They work over mutually-recursive families of types, the constructions of codes for these types is described in their paper.

Our friend @arianvp wrote generics-mrsop which is a Haskell port of Agda code, the universe descriptions can be found here https://github.com/VictorCMiraldo/stdiff/blob/master/Generic/Multirec.agda

generics-mrsop-diff

We might want to upgrade our current universe to this one :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions