Skip to content

Add a total order on type constructors

Several proposals for ExtensibleRecords can be implemented as libraries if type constructors can be ordered globally.

This proposal is to add built-in types:

data LabelLT
data LabelEQ
data LabelGT
type family LabelCMP

such that, for any two datatypes

data N = N
data M = M

the instance LabelCMP N M takes one of the values LabelLT, LabelEQ, LabelGT depending on the lexicographic ordering on the fully-qualified names of N and M.

Trac metadata
Trac field Value
Version 6.8.1
Type FeatureRequest
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler (Type checker)
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system Multiple
Architecture Multiple
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information