From 571c792fc1cf234c92b3c78eb47bc7e8b789bb85 Mon Sep 17 00:00:00 2001 From: Tom Smeding Date: Fri, 14 Nov 2025 11:00:44 +0100 Subject: Equality on singletons is trivial --- src/Data/Array/Nested/Shaped/Shape.hs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/Data/Array') diff --git a/src/Data/Array/Nested/Shaped/Shape.hs b/src/Data/Array/Nested/Shaped/Shape.hs index aa98707..10e1a9d 100644 --- a/src/Data/Array/Nested/Shaped/Shape.hs +++ b/src/Data/Array/Nested/Shaped/Shape.hs @@ -273,7 +273,10 @@ ixsPermutePrefix = coerce (listsPermutePrefix @(Const i)) type role ShS nominal type ShS :: [Nat] -> Type newtype ShS sh = ShS (ListS sh SNat) - deriving (Eq, Ord, Generic) + deriving (Generic) + +instance Eq (ShS sh) where _ == _ = True +instance Ord (ShS sh) where compare _ _ = EQ pattern ZSS :: forall sh. () => sh ~ '[] => ShS sh pattern ZSS = ShS ZS -- cgit v1.2.3-70-g09d2