Skip to content

Relational binops on unit type are nonsensical #576

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 (() >= ());

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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