diff options
| author | Mikolaj Konarski <mikolaj.konarski@funktory.com> | 2025-12-15 21:13:26 +0100 |
|---|---|---|
| committer | Mikolaj Konarski <mikolaj.konarski@funktory.com> | 2025-12-15 22:24:42 +0100 |
| commit | e0a3bb1c048dd6e80ef12beaf92ec293d262b5be (patch) | |
| tree | 762a8b26db111b2992845d99ef83b4ded38434c3 | |
| parent | 5f394dae0999a3d918a78d1a208edda6386d959f (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 1071859..7c79f8b 100644 --- a/src/Data/Array/Nested/Mixed/Shape.hs +++ b/src/Data/Array/Nested/Mixed/Shape.hs @@ -650,7 +650,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 |
