diff options
| author | Mikolaj Konarski <mikolaj.konarski@funktory.com> | 2025-12-15 21:13:26 +0100 |
|---|---|---|
| committer | Mikolaj Konarski <mikolaj.konarski@funktory.com> | 2026-03-15 10:35:46 +0100 |
| commit | c68edd1f51dc08aabc36aed0ca3273e4751fcf5f (patch) | |
| tree | 42e5abcbfd9d66b3f66ab050b50607a2679a67e5 | |
| parent | d8cc5e2bcf2fcac1142b5dd2f36f1995a2427f32 (diff) | |
Add the trivial Eq and Ord instances also for StaticShX
| -rw-r--r-- | src/Data/Array/Nested/Mixed/Shape.hs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Data/Array/Nested/Mixed/Shape.hs b/src/Data/Array/Nested/Mixed/Shape.hs index 6fee968..bd72f8d 100644 --- a/src/Data/Array/Nested/Mixed/Shape.hs +++ b/src/Data/Array/Nested/Mixed/Shape.hs @@ -651,7 +651,10 @@ shxCast' ssh sh = case shxCast ssh sh of -- | The part of a shape that is statically known. (A newtype over 'ListH'.) type StaticShX :: [Maybe Nat] -> Type newtype StaticShX sh = StaticShX (ListH sh ()) - deriving (Eq, Ord, NFData) + deriving (NFData) + +instance Eq (StaticShX sh) where _ == _ = True +instance Ord (StaticShX sh) where compare _ _ = EQ pattern ZKX :: forall sh. () => sh ~ '[] => StaticShX sh pattern ZKX = StaticShX ZH |
