Skip to content

Cleaning up the various hierarchies #876

@MatthewDaggitt

Description

@MatthewDaggitt

Having just re-defined the function hierarchy, and as I'm just about to contribute a hierarchy for metric spaces under Function.Metric, I'm keen to standardise the files involved in each hierarchy. Currently we have:

  • Functions
    • Function.Core
    • Function.Definitions
    • Function.Structures
    • Function.Packages
    • Function (empty, but re-exports all of the above)
  • Algebra
    • Algebra.FunctionProperties.Core
    • Algebra.FunctionProperties (re-exports the above)
    • Algebra.Structures
    • Algebra
  • Binary relations
    • Relation.Binary.Core
    • Relation.Binary (full, and re-exports all of the above)

To straighten this out I propose that every hierarchy X should have the following files

  • X.Core - contains very basic definitions, e.g. Op, Op₂, Rel, REL, Fun as well as basic combinators if applicable (e.g. function composition)
  • X.Definitions - contains named properties, e.g. Transitive, Commutative, Injective
  • X.Structures - self-explanatory
  • X.Packages - self-explanatory
  • X which publicly re-exports all of the above, parameterised by equality relations if applicable.

As the proposed top-level X module re-exports the contents of the previous modules, this should be doable in an entirely backwards compatible manner.

The only reservation I have is perhaps the name Definitions. I'd definitely prefer Properties but that name is already reserved for a certain class of files. Anyone have any thoughts?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions