You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Working on #2111 exposes a previously uncaught error: under Data.Tree.AVL, a number of modules (attempt to) declare 'local' instances of StrictTotalOrderwithout 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.
The text was updated successfully, but these errors were encountered:
So the bug expressed itself in terms of unsolved Level meta variables... my diagnosis in terms of leaves in the hierarchy is post hoc inference, and there may be other possibilities, but inserting the type declaration certainly solves/d the instances that came up.
And yes, a weird one! Added label:bug because this is a 'latent' bug, and one to program defensively against.
jamesmckinna
changed the title
Record definitions need accompanying type signatures
*Top-level* Record definitions need accompanying type signatures
Oct 16, 2023
Working on #2111 exposes a previously uncaught error: under
Data.Tree.AVL
, a number of modules (attempt to) declare 'local' instances ofStrictTotalOrder
without declaring a suitable type signature for them, which worked perfectly fine as long as this record type was a leaf in theAlgebra.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.
The text was updated successfully, but these errors were encountered: