Make the Eq instance doc clearer.

Avoid using byteCmp example, it may give an impression of how the
instance is defined.
This commit is contained in:
Harendra Kumar 2024-01-01 10:07:08 +05:30
parent 0ebc91ccab
commit 5274d3f1e3

View File

@ -879,13 +879,9 @@ MK_EQ_INSTANCE(Int16)
MK_EQ_INSTANCE(Int32)
MK_EQ_INSTANCE(Int64)
-- | If the type allows a byte-by-byte comparison (see 'byteCmp') this instance
-- can be overlapped by a more specific instance that uses a byte comparison.
-- Byte comparison can be significantly faster.
--
-- For example:
--
-- >>> (==) = byteCmp
-- | If the type allows a byte-by-byte comparison this instance can be
-- overlapped by a more specific instance that uses 'byteCmp'. Byte comparison
-- can be significantly faster.
--
instance {-# OVERLAPPABLE #-} (Unbox a, Eq a) => Eq (Array a) where
{-# INLINE (==) #-}