From d5402b39f31f4cf56a8f583f1d6ceaf7a8aa5acf Mon Sep 17 00:00:00 2001 From: Tom Smeding Date: Tue, 18 Feb 2025 10:38:30 +0100 Subject: All arrays are Eq and Ord (they compare shape first, then values) This comparison policy is lifted straight from orthotope (and indeed the instances are all just auto-derived). --- src/Data/Array/Mixed/XArray.hs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/Data/Array/Mixed') diff --git a/src/Data/Array/Mixed/XArray.hs b/src/Data/Array/Mixed/XArray.hs index b564e14..71bdc1f 100644 --- a/src/Data/Array/Mixed/XArray.hs +++ b/src/Data/Array/Mixed/XArray.hs @@ -38,10 +38,7 @@ import Data.Array.Mixed.Types type XArray :: [Maybe Nat] -> Type -> Type newtype XArray sh a = XArray (S.Array (Rank sh) a) - deriving (Show, Eq, Generic) - --- | Only on scalars, because lexicographical ordering is strange on multi-dimensional arrays. -deriving instance (Ord a, Storable a) => Ord (XArray sh a) + deriving (Show, Eq, Ord, Generic) instance NFData (XArray sh a) -- cgit v1.2.3-70-g09d2