Skip to content

Commit 076b9ce

Browse files
authored
Remove Ord instance from Array. (#23)
1 parent c4e4aca commit 076b9ce

File tree

2 files changed

+1
-13
lines changed

2 files changed

+1
-13
lines changed

Diff for: src/ArrayFire.hs

+1-7
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ import Data.Word
201201
-- Specifying up to 4 dimensions is allowed (anything high is ignored).
202202

203203
-- $laws
204-
-- Every 'Array' is an instance of 'Eq', 'Ord', 'Num', 'Fractional', 'Floating'
204+
-- Every 'Array' is an instance of 'Eq', 'Num', 'Fractional', 'Floating'
205205
--
206206
-- 'Num'
207207
--
@@ -240,12 +240,6 @@ import Data.Word
240240
-- >>> scalar @Double 1 [10] /= scalar @Double 1 [10]
241241
-- False
242242
--
243-
-- 'Ord'
244-
--
245-
-- >>> scalar @Double 1 [10] < scalar @Double 1 [10]
246-
-- False
247-
-- >>> scalar @Double 1 [10] > scalar @Double 1 [10]
248-
-- False
249243
--
250244
-- 'Floating'
251245
--

Diff for: src/ArrayFire/Orphans.hs

-6
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,6 @@ instance (Num a, AFType a) => Num (Array a) where
3939
x - y = A.sub x y
4040
fromInteger = A.scalar . fromIntegral
4141

42-
instance (Ord a, AFType a) => Ord (Array a) where
43-
x < y = A.allTrueAll (A.ltBatched x y False) == (1.0,0.0)
44-
x > y = A.allTrueAll (A.gtBatched x y False) == (1.0,0.0)
45-
x <= y = A.allTrueAll (A.leBatched x y False) == (1.0,0.0)
46-
x >= y = A.allTrueAll (A.geBatched x y False) == (1.0,0.0)
47-
4842
instance Show (Array a) where
4943
show = arrayString
5044

0 commit comments

Comments
 (0)