Skip to content

Relational binops on unit type are nonsensical #576

Closed
@brson

Description

@brson

The following is currently what holds for relational binops on ()

  assert (() < ());
  assert (() <= ());
  assert (!(() > ()));
  assert (!(() >= ()));

Now, because we have relational binops over structural types, we have to either have relational binops over all types, or make structural comparisons much more complicated. But the implementation for unit is arbitrary. Suggest the following

  assert (!(() < ()));
  assert (() <= ());
  assert (!(() > ()));
  assert (() >= ());

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