aboutsummaryrefslogtreecommitdiff
path: root/src/Data/Array/Nested
diff options
context:
space:
mode:
authorTom Smeding <tom@tomsmeding.com>2025-11-14 11:00:44 +0100
committerTom Smeding <tom@tomsmeding.com>2025-11-14 11:00:44 +0100
commit571c792fc1cf234c92b3c78eb47bc7e8b789bb85 (patch)
tree465a4866648ce4a8d8fb1803ecd5b9b631c160a9 /src/Data/Array/Nested
parent5b18d768e3119f8c38657772b60b6f66c5b02b64 (diff)
Equality on singletons is trivialHEADmaster
Diffstat (limited to 'src/Data/Array/Nested')
-rw-r--r--src/Data/Array/Nested/Shaped/Shape.hs5
1 files changed, 4 insertions, 1 deletions
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