Skip to content

*Top-level* Record definitions need accompanying type signatures #2112

Closed
@jamesmckinna

Description

@jamesmckinna

Working on #2111 exposes a previously uncaught error: under Data.Tree.AVL, a number of modules (attempt to) declare 'local' instances of StrictTotalOrder without declaring a suitable type signature for them, which worked perfectly fine as long as this record type was a leaf in the Algebra.Bundles hierarchy...

... but adding (Is)DenseLinearOrder as a sub(structure)/bundle of (Is)StrictTotalOrder has now broken that.

Remedy: identify all record definitions without a type signature, and supply it appropriately.
UPDATED: issue only applies to top-level definitions; within the scope of an enclosing record, the type of the field being defined as a sub-record ensures that a suitable type is being supplied to the typechecker.
UPDATED: I've attempted to identify any other instances in the library, but it seems just to have been these 'historical' examples. Suggest closing the issue now/for the time being.

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