Skip to content

The type of abstraction #485

@andrejbauer

Description

@andrejbauer

This is a partial response to #482.

The abstraction notation {x : A} C is overloaded, as it has two possible types: C could be a judgement or a boundary. As far as the AML type system is concerned this is a hack (because the only form of polymorphism expressible is parametric polymorphism).

The principled solution would be to introduce several kinds of types. We would have the kind of all types type and the subkind judgement_or_boundary (where of course we'd need a better name). SML uses this solution to keep track of which types have a pre-defined structural equality (the types of kind eqtype).

Once we have the kind of "abstractable types" (so let us call this kind abstype), we would be tempted to stick in it other types, apart from judgement and boundary. For instance, it may be quite useful to have an abstracted pair of judgements, so abstype should/could be closed under products, so that once can have {x : A} (C1, C2) (here C1 and C2 are simultaneously abstracted by x : A). In fact, it could be closed under any type constructor which allows us to "fold" over the type.

It is not quite clear how to design this sort of thing. Does the nucleus know about abstracted pairs of judgements? List of abstacted judgement?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions