Copyright | (c) The University of Glasgow 2005 |
---|---|
License | BSD-style (see the file libraries/base/LICENSE) |
Maintainer | libraries@haskell.org |
Stability | stable |
Portability | portable |
Safe Haskell | Safe |
Language | Haskell2010 |
Equality
Documentation
The Eq
class defines equality (==
) and inequality (/=
).
All the basic datatypes exported by the Prelude are instances of Eq
,
and Eq
may be derived for any datatype whose constituents are also
instances of Eq
.
The Haskell Report defines no laws for Eq
. However, instances are
encouraged to follow these properties:
Instances
Eq ByteArray Source # | Since: base-4.17.0.0 |
Eq Timeout Source # | |
Eq BigNat | |
Eq Void | @since base-4.8.0.0 |
Eq ByteOrder | @since base-4.11.0.0 |
Eq ClosureType | |
Defined in GHC.Internal.ClosureTypes (==) :: ClosureType -> ClosureType -> Bool Source # (/=) :: ClosureType -> ClosureType -> Bool Source # | |
Eq BlockReason | @since base-4.3.0.0 |
Defined in GHC.Internal.Conc.Sync (==) :: BlockReason -> BlockReason -> Bool Source # (/=) :: BlockReason -> BlockReason -> Bool Source # | |
Eq ThreadId | @since base-4.2.0.0 |
Eq ThreadStatus | @since base-4.3.0.0 |
Defined in GHC.Internal.Conc.Sync (==) :: ThreadStatus -> ThreadStatus -> Bool Source # (/=) :: ThreadStatus -> ThreadStatus -> Bool Source # | |
Eq Constr | Equality of constructors @since base-4.0.0.0 |
Eq ConstrRep | @since base-4.0.0.0 |
Eq DataRep | @since base-4.0.0.0 |
Eq Fixity | @since base-4.0.0.0 |
Eq All | @since base-2.01 |
Eq Any | @since base-2.01 |
Eq SomeTypeRep | |
Defined in GHC.Internal.Data.Typeable.Internal (==) :: SomeTypeRep -> SomeTypeRep -> Bool Source # (/=) :: SomeTypeRep -> SomeTypeRep -> Bool Source # | |
Eq Unique | |
Eq Version | @since base-2.01 |
Eq ControlMessage | @since base-4.4.0.0 |
Eq Event | @since base-4.4.0.0 |
Eq EventLifetime | @since base-4.8.0.0 |
Eq Lifetime | @since base-4.8.1.0 |
Eq FdKey | @since base-4.4.0.0 |
Eq State | @since base-4.4.0.0 |
Eq TimeoutKey | |
Defined in GHC.Internal.Event.TimeOut (==) :: TimeoutKey -> TimeoutKey -> Bool Source # (/=) :: TimeoutKey -> TimeoutKey -> Bool Source # | |
Eq State | @since base-4.7.0.0 |
Eq Unique | @since base-4.4.0.0 |
Eq ErrorCall | @since base-4.7.0.0 |
Eq ArithException | @since base-3.0 |
Defined in GHC.Internal.Exception.Type (==) :: ArithException -> ArithException -> Bool Source # (/=) :: ArithException -> ArithException -> Bool Source # | |
Eq SpecConstrAnnotation | @since base-4.3.0.0 |
Defined in GHC.Internal.Exts (==) :: SpecConstrAnnotation -> SpecConstrAnnotation -> Bool Source # (/=) :: SpecConstrAnnotation -> SpecConstrAnnotation -> Bool Source # | |
Eq Fingerprint | @since base-4.4.0.0 |
Defined in GHC.Internal.Fingerprint.Type (==) :: Fingerprint -> Fingerprint -> Bool Source # (/=) :: Fingerprint -> Fingerprint -> Bool Source # | |
Eq Errno | @since base-2.01 |
Eq CBool | |
Eq CChar | |
Eq CClock | |
Eq CDouble | |
Eq CFloat | |
Eq CInt | |
Eq CIntMax | |
Eq CIntPtr | |
Eq CLLong | |
Eq CLong | |
Eq CPtrdiff | |
Eq CSChar | |
Eq CSUSeconds | |
Defined in GHC.Internal.Foreign.C.Types (==) :: CSUSeconds -> CSUSeconds -> Bool Source # (/=) :: CSUSeconds -> CSUSeconds -> Bool Source # | |
Eq CShort | |
Eq CSigAtomic | |
Defined in GHC.Internal.Foreign.C.Types (==) :: CSigAtomic -> CSigAtomic -> Bool Source # (/=) :: CSigAtomic -> CSigAtomic -> Bool Source # | |
Eq CSize | |
Eq CTime | |
Eq CUChar | |
Eq CUInt | |
Eq CUIntMax | |
Eq CUIntPtr | |
Eq CULLong | |
Eq CULong | |
Eq CUSeconds | |
Eq CUShort | |
Eq CWchar | |
Eq IntPtr | |
Eq WordPtr | |
Eq Associativity | @since base-4.6.0.0 |
Defined in GHC.Internal.Generics (==) :: Associativity -> Associativity -> Bool Source # (/=) :: Associativity -> Associativity -> Bool Source # | |
Eq DecidedStrictness | @since base-4.9.0.0 |
Defined in GHC.Internal.Generics (==) :: DecidedStrictness -> DecidedStrictness -> Bool Source # (/=) :: DecidedStrictness -> DecidedStrictness -> Bool Source # | |
Eq Fixity | @since base-4.6.0.0 |
Eq SourceStrictness | @since base-4.9.0.0 |
Defined in GHC.Internal.Generics (==) :: SourceStrictness -> SourceStrictness -> Bool Source # (/=) :: SourceStrictness -> SourceStrictness -> Bool Source # | |
Eq SourceUnpackedness | @since base-4.9.0.0 |
Defined in GHC.Internal.Generics (==) :: SourceUnpackedness -> SourceUnpackedness -> Bool Source # (/=) :: SourceUnpackedness -> SourceUnpackedness -> Bool Source # | |
Eq MaskingState | @since base-4.3.0.0 |
Defined in GHC.Internal.IO (==) :: MaskingState -> MaskingState -> Bool Source # (/=) :: MaskingState -> MaskingState -> Bool Source # | |
Eq BufferState | @since base-4.2.0.0 |
Defined in GHC.Internal.IO.Buffer (==) :: BufferState -> BufferState -> Bool Source # (/=) :: BufferState -> BufferState -> Bool Source # | |
Eq IODeviceType | @since base-4.2.0.0 |
Defined in GHC.Internal.IO.Device (==) :: IODeviceType -> IODeviceType -> Bool Source # (/=) :: IODeviceType -> IODeviceType -> Bool Source # | |
Eq SeekMode | @since base-4.2.0.0 |
Eq CodingProgress | @since base-4.4.0.0 |
Defined in GHC.Internal.IO.Encoding.Types (==) :: CodingProgress -> CodingProgress -> Bool Source # (/=) :: CodingProgress -> CodingProgress -> Bool Source # | |
Eq ArrayException | @since base-4.2.0.0 |
Defined in GHC.Internal.IO.Exception (==) :: ArrayException -> ArrayException -> Bool Source # (/=) :: ArrayException -> ArrayException -> Bool Source # | |
Eq AsyncException | @since base-4.2.0.0 |
Defined in GHC.Internal.IO.Exception (==) :: AsyncException -> AsyncException -> Bool Source # (/=) :: AsyncException -> AsyncException -> Bool Source # | |
Eq ExitCode | |
Eq IOErrorType | @since base-4.1.0.0 |
Defined in GHC.Internal.IO.Exception (==) :: IOErrorType -> IOErrorType -> Bool Source # (/=) :: IOErrorType -> IOErrorType -> Bool Source # | |
Eq IOException | @since base-4.1.0.0 |
Defined in GHC.Internal.IO.Exception (==) :: IOException -> IOException -> Bool Source # (/=) :: IOException -> IOException -> Bool Source # | |
Eq HandlePosn | @since base-4.1.0.0 |
Defined in GHC.Internal.IO.Handle (==) :: HandlePosn -> HandlePosn -> Bool Source # (/=) :: HandlePosn -> HandlePosn -> Bool Source # | |
Eq BufferMode | @since base-4.2.0.0 |
Defined in GHC.Internal.IO.Handle.Types (==) :: BufferMode -> BufferMode -> Bool Source # (/=) :: BufferMode -> BufferMode -> Bool Source # | |
Eq Handle | @since base-4.1.0.0 |
Eq Newline | @since base-4.2.0.0 |
Eq NewlineMode | @since base-4.2.0.0 |
Defined in GHC.Internal.IO.Handle.Types (==) :: NewlineMode -> NewlineMode -> Bool Source # (/=) :: NewlineMode -> NewlineMode -> Bool Source # | |
Eq IOMode | @since base-4.2.0.0 |
Eq InfoProv | |
Eq Int16 | @since base-2.01 |
Eq Int32 | @since base-2.01 |
Eq Int64 | @since base-2.01 |
Eq Int8 | @since base-2.01 |
Eq IoSubSystem | |
Defined in GHC.Internal.RTS.Flags (==) :: IoSubSystem -> IoSubSystem -> Bool Source # (/=) :: IoSubSystem -> IoSubSystem -> Bool Source # | |
Eq StackEntry | |
Defined in GHC.Internal.Stack.CloneStack (==) :: StackEntry -> StackEntry -> Bool Source # (/=) :: StackEntry -> StackEntry -> Bool Source # | |
Eq SrcLoc | @since base-4.9.0.0 |
Eq CBlkCnt | |
Eq CBlkSize | |
Eq CCc | |
Eq CClockId | |
Eq CDev | |
Eq CFsBlkCnt | |
Eq CFsFilCnt | |
Eq CGid | |
Eq CId | |
Eq CIno | |
Eq CKey | |
Eq CMode | |
Eq CNfds | |
Eq CNlink | |
Eq COff | |
Eq CPid | |
Eq CRLim | |
Eq CSocklen | |
Eq CSpeed | |
Eq CSsize | |
Eq CTcflag | |
Eq CTimer | |
Eq CUid | |
Eq Fd | |
Eq Lexeme | @since base-2.01 |
Eq Number | @since base-4.6.0.0 |
Eq SomeChar | |
Eq SomeSymbol | @since base-4.7.0.0 |
Defined in GHC.Internal.TypeLits (==) :: SomeSymbol -> SomeSymbol -> Bool Source # (/=) :: SomeSymbol -> SomeSymbol -> Bool Source # | |
Eq SomeNat | @since base-4.7.0.0 |
Eq GeneralCategory | @since base-2.01 |
Defined in GHC.Internal.Unicode (==) :: GeneralCategory -> GeneralCategory -> Bool Source # (/=) :: GeneralCategory -> GeneralCategory -> Bool Source # | |
Eq Word16 | @since base-2.01 |
Eq Word32 | @since base-2.01 |
Eq Word64 | @since base-2.01 |
Eq Word8 | @since base-2.01 |
Eq Module | |
Eq Ordering | |
Eq TrName | |
Eq TyCon | |
Eq Integer | |
Eq Natural | |
Eq () | |
Eq Bool | |
Eq Char | |
Eq Double | Note that due to the presence of
Also note that
|
Eq Float | Note that due to the presence of
Also note that
|
Eq Int | |
Eq Word | |
Eq (Chan a) Source # | Since: base-4.4.0.0 |
Eq (MutableByteArray s) Source # | Since: base-4.17.0.0 |
Defined in Data.Array.Byte (==) :: MutableByteArray s -> MutableByteArray s -> Bool Source # (/=) :: MutableByteArray s -> MutableByteArray s -> Bool Source # | |
Eq a => Eq (Complex a) Source # | Since: base-2.1 |
Eq a => Eq (First a) Source # | Since: base-4.9.0.0 |
Eq a => Eq (Last a) Source # | Since: base-4.9.0.0 |
Eq a => Eq (Max a) Source # | Since: base-4.9.0.0 |
Eq a => Eq (Min a) Source # | Since: base-4.9.0.0 |
Eq m => Eq (WrappedMonoid m) Source # | Since: base-4.9.0.0 |
Defined in Data.Semigroup (==) :: WrappedMonoid m -> WrappedMonoid m -> Bool Source # (/=) :: WrappedMonoid m -> WrappedMonoid m -> Bool Source # | |
Eq a => Eq (NonEmpty a) | @since base-4.9.0.0 |
Eq (TVar a) | @since base-4.8.0.0 |
Eq a => Eq (And a) | @since base-4.16 |
Eq a => Eq (Iff a) | @since base-4.16 |
Eq a => Eq (Ior a) | @since base-4.16 |
Eq a => Eq (Xor a) | @since base-4.16 |
Eq a => Eq (Identity a) | @since base-4.8.0.0 |
Eq a => Eq (First a) | @since base-2.01 |
Eq a => Eq (Last a) | @since base-2.01 |
Eq a => Eq (Down a) | @since base-4.6.0.0 |
Eq a => Eq (Dual a) | @since base-2.01 |
Eq a => Eq (Product a) | @since base-2.01 |
Eq a => Eq (Sum a) | @since base-2.01 |
Eq (ConstPtr a) | |
Eq (ForeignPtr a) | @since base-2.01 |
Defined in GHC.Internal.ForeignPtr (==) :: ForeignPtr a -> ForeignPtr a -> Bool Source # (/=) :: ForeignPtr a -> ForeignPtr a -> Bool Source # | |
Eq a => Eq (ZipList a) | @since base-4.7.0.0 |
Eq p => Eq (Par1 p) | @since base-4.7.0.0 |
Eq (IOPort a) | @since base-4.1.0.0 |
Eq (IORef a) | Pointer equality. @since base-4.0.0.0 |
Eq (MVar a) | Compares the underlying pointers. @since base-4.1.0.0 |
Eq (FunPtr a) | |
Eq (Ptr a) | @since base-2.01 |
Eq a => Eq (Ratio a) | @since base-2.01 |
Eq (StablePtr a) | @since base-2.01 |
Eq (StableName a) | @since base-2.01 |
Defined in GHC.Internal.StableName (==) :: StableName a -> StableName a -> Bool Source # (/=) :: StableName a -> StableName a -> Bool Source # | |
Eq (SChar c) | @since base-4.19.0.0 |
Eq (SSymbol s) | @since base-4.19.0.0 |
Eq (SNat n) | @since base-4.19.0.0 |
Eq a => Eq (Maybe a) | @since base-2.01 |
Eq a => Eq (Solo a) | |
Eq a => Eq [a] | |
Eq (Fixed a) Source # | Since: base-2.1 |
Eq a => Eq (Arg a b) Source # | Since: base-4.9.0.0 |
(Ix i, Eq e) => Eq (Array i e) | @since base-2.01 |
(Eq a, Eq b) => Eq (Either a b) | @since base-2.01 |
Eq (Proxy s) | @since base-4.7.0.0 |
Eq (TypeRep a) | @since base-2.01 |
Eq (U1 p) | @since base-4.9.0.0 |
Eq (V1 p) | @since base-4.9.0.0 |
Eq (IOArray i e) | @since base-4.1.0.0 |
Eq (STRef s a) | Pointer equality. @since base-2.01 |
(Eq a, Eq b) => Eq (a, b) | |
Eq (STArray s i e) | @since base-2.01 |
Eq a => Eq (Const a b) | @since base-4.9.0.0 |
Eq (f a) => Eq (Ap f a) | @since base-4.12.0.0 |
Eq (f a) => Eq (Alt f a) | @since base-4.8.0.0 |
Eq (Coercion a b) | @since base-4.7.0.0 |
Eq (a :~: b) | @since base-4.7.0.0 |
Eq (OrderingI a b) | |
(Generic1 f, Eq (Rep1 f a)) => Eq (Generically1 f a) | @since base-4.18.0.0 |
Defined in GHC.Internal.Generics (==) :: Generically1 f a -> Generically1 f a -> Bool Source # (/=) :: Generically1 f a -> Generically1 f a -> Bool Source # | |
Eq (f p) => Eq (Rec1 f p) | @since base-4.7.0.0 |
Eq (URec (Ptr ()) p) | @since base-4.9.0.0 |
Eq (URec Char p) | @since base-4.9.0.0 |
Eq (URec Double p) | @since base-4.9.0.0 |
Eq (URec Float p) | |
Eq (URec Int p) | @since base-4.9.0.0 |
Eq (URec Word p) | @since base-4.9.0.0 |
(Eq a, Eq b, Eq c) => Eq (a, b, c) | |
(Eq (f a), Eq (g a)) => Eq (Product f g a) Source # | Since: base-4.18.0.0 |
(Eq (f a), Eq (g a)) => Eq (Sum f g a) Source # | Since: base-4.18.0.0 |
Eq (a :~~: b) | @since base-4.10.0.0 |
(Eq (f p), Eq (g p)) => Eq ((f :*: g) p) | @since base-4.7.0.0 |
(Eq (f p), Eq (g p)) => Eq ((f :+: g) p) | @since base-4.7.0.0 |
Eq c => Eq (K1 i c p) | @since base-4.7.0.0 |
(Eq a, Eq b, Eq c, Eq d) => Eq (a, b, c, d) | |
Eq (f (g a)) => Eq (Compose f g a) Source # | Since: base-4.18.0.0 |
Eq (f (g p)) => Eq ((f :.: g) p) | @since base-4.7.0.0 |
Eq (f p) => Eq (M1 i c f p) | @since base-4.7.0.0 |
(Eq a, Eq b, Eq c, Eq d, Eq e) => Eq (a, b, c, d, e) | |
(Eq a, Eq b, Eq c, Eq d, Eq e, Eq f) => Eq (a, b, c, d, e, f) | |
(Eq a, Eq b, Eq c, Eq d, Eq e, Eq f, Eq g) => Eq (a, b, c, d, e, f, g) | |
(Eq a, Eq b, Eq c, Eq d, Eq e, Eq f, Eq g, Eq h) => Eq (a, b, c, d, e, f, g, h) | |
(Eq a, Eq b, Eq c, Eq d, Eq e, Eq f, Eq g, Eq h, Eq i) => Eq (a, b, c, d, e, f, g, h, i) | |
(Eq a, Eq b, Eq c, Eq d, Eq e, Eq f, Eq g, Eq h, Eq i, Eq j) => Eq (a, b, c, d, e, f, g, h, i, j) | |
(Eq a, Eq b, Eq c, Eq d, Eq e, Eq f, Eq g, Eq h, Eq i, Eq j, Eq k) => Eq (a, b, c, d, e, f, g, h, i, j, k) | |
(Eq a, Eq b, Eq c, Eq d, Eq e, Eq f, Eq g, Eq h, Eq i, Eq j, Eq k, Eq l) => Eq (a, b, c, d, e, f, g, h, i, j, k, l) | |
(Eq a, Eq b, Eq c, Eq d, Eq e, Eq f, Eq g, Eq h, Eq i, Eq j, Eq k, Eq l, Eq m) => Eq (a, b, c, d, e, f, g, h, i, j, k, l, m) | |
(Eq a, Eq b, Eq c, Eq d, Eq e, Eq f, Eq g, Eq h, Eq i, Eq j, Eq k, Eq l, Eq m, Eq n) => Eq (a, b, c, d, e, f, g, h, i, j, k, l, m, n) | |
(Eq a, Eq b, Eq c, Eq d, Eq e, Eq f, Eq g, Eq h, Eq i, Eq j, Eq k, Eq l, Eq m, Eq n, Eq o) => Eq (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) | |