Skip to content

Commit

Permalink
Fix SemiRegular.
Browse files Browse the repository at this point in the history
Fixes #1620.

Another pass to loosen some constraints now that SemiRegular refines
Copyable is warranted.
  • Loading branch information
dabrahams committed Nov 24, 2024
1 parent 02a00f3 commit 7a41962
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion StandardLibrary/Sources/Array.hylo
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ public type Array<Element: SemiRegular>: SemiRegular {

}

public conformance Array: Equatable {
public conformance Array: Equatable where Element: Equatable {

/// Returns `true` iff `other` has an equivalent value.
public fun infix== (_ other: Self) -> Bool {
Expand Down
4 changes: 2 additions & 2 deletions StandardLibrary/Sources/Core/Regular.hylo
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
///
/// - Move is value-preserving.
/// - Destruction has no side-effects.
public trait SemiRegular: Deinitializable, Movable, Equatable {}
public trait SemiRegular: Copyable, Deinitializable {}

/// Regular types (roughly per Stepanov).
///
/// Copies have equal value.
public trait Regular: SemiRegular, Copyable {}
public trait Regular: SemiRegular, Equatable {}

0 comments on commit 7a41962

Please sign in to comment.