Skip to content

Clarify the conventions for parameterized classes #23

Open
@langston-barrett

Description

@langston-barrett

The classes in this library generalize those in base in several ways, but the naming convention and module structure isn't consistent. In the following, I'll focus just on Eq* and Ord*, though similar comments apply elsewhere.

  • Eq, Ord, etc. classes in base
    • parameter kind: Type
    • parameter constraints: n/a
    • kind polymorphic: n/a
    • type-level evidence: n/a
    • heterogeneous: no
  • Eq1, Ord1, in Data.Functor.Classes
    • parameter kind: Type -> Type
    • kind polymorphic: no
    • parameter constraints: yes, Eq, Ord, etc.
    • type-level evidence: no
    • heterogeneous: yes
  • EqF
    • parameter kind: k -> Type
    • kind polymorphic: yes
    • parameter constraints: none
    • type-level evidence: n/a
    • heterogeneous: no
  • OrdF
    • parameter kind: k -> Type
    • kind polymorphic: yes
    • parameter constraints: none
    • type-level evidence: yes
    • heterogeneous: yes
  • TestEquality
    • parameter kind: k -> Type
    • kind polymorphic: yes
    • parameter constraints: none
    • type-level evidence: yes
    • heterogeneous: yes
  • PolyEq
    • parameter kinds: * and *
    • kind polymorphic: n/a
    • parameter constraints: none
    • type-level evidence: yes
    • heterogeneous: yes

to say nothing of TestEqualityFC and OrdFC!

In summary, three roughly five axes I identify above, some of which have somewhat associated naming conventions. It would be great if we could decide on something sensible for all of them and implement it consistently.

The current state of affairs is mostly the following suffix conventions

  • F denotes something with parameter kind (k -> *)
  • 1 denotes something with parameter kind *
  • FC denotes something with parameter kinds (k -> *) and l

Generalizing from one example, it might be the case that the prefix Poly denotes something which is heterogeneous.

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