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 | Trustworthy |
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 Constr Source # | Equality of constructors Since: base-4.0.0.0 |
Eq ConstrRep Source # | Since: base-4.0.0.0 |
Eq DataRep Source # | Since: base-4.0.0.0 |
Eq Fixity Source # | Since: base-4.0.0.0 |
Eq All Source # | Since: base-2.1 |
Eq Any Source # | Since: base-2.1 |
Eq SomeTypeRep Source # | |
Defined in Data.Typeable.Internal (==) :: SomeTypeRep -> SomeTypeRep -> Bool Source # (/=) :: SomeTypeRep -> SomeTypeRep -> Bool Source # | |
Eq Unique Source # | |
Eq Version Source # | Since: base-2.1 |
Eq Void Source # | Since: base-4.8.0.0 |
Eq Errno Source # | Since: base-2.1 |
Eq CBool Source # | |
Eq CChar Source # | |
Eq CClock Source # | |
Eq CDouble Source # | |
Eq CFloat Source # | |
Eq CInt Source # | |
Eq CIntMax Source # | |
Eq CIntPtr Source # | |
Eq CLLong Source # | |
Eq CLong Source # | |
Eq CPtrdiff Source # | |
Eq CSChar Source # | |
Eq CSUSeconds Source # | |
Defined in Foreign.C.Types (==) :: CSUSeconds -> CSUSeconds -> Bool Source # (/=) :: CSUSeconds -> CSUSeconds -> Bool Source # | |
Eq CShort Source # | |
Eq CSigAtomic Source # | |
Defined in Foreign.C.Types (==) :: CSigAtomic -> CSigAtomic -> Bool Source # (/=) :: CSigAtomic -> CSigAtomic -> Bool Source # | |
Eq CSize Source # | |
Eq CTime Source # | |
Eq CUChar Source # | |
Eq CUInt Source # | |
Eq CUIntMax Source # | |
Eq CUIntPtr Source # | |
Eq CULLong Source # | |
Eq CULong Source # | |
Eq CUSeconds Source # | |
Eq CUShort Source # | |
Eq CWchar Source # | |
Eq IntPtr Source # | |
Eq WordPtr Source # | |
Eq ByteOrder Source # | Since: base-4.11.0.0 |
Eq BlockReason Source # | Since: base-4.3.0.0 |
Defined in GHC.Conc.Sync (==) :: BlockReason -> BlockReason -> Bool Source # (/=) :: BlockReason -> BlockReason -> Bool Source # | |
Eq ThreadId Source # | Since: base-4.2.0.0 |
Eq ThreadStatus Source # | Since: base-4.3.0.0 |
Defined in GHC.Conc.Sync (==) :: ThreadStatus -> ThreadStatus -> Bool Source # (/=) :: ThreadStatus -> ThreadStatus -> Bool Source # | |
Eq Event Source # | Since: base-4.4.0.0 |
Eq Lifetime Source # | Since: base-4.8.1.0 |
Eq FdKey Source # | Since: base-4.4.0.0 |
Eq TimeoutKey Source # | |
Defined in GHC.Event.TimeOut (==) :: TimeoutKey -> TimeoutKey -> Bool Source # (/=) :: TimeoutKey -> TimeoutKey -> Bool Source # | |
Eq ErrorCall Source # | Since: base-4.7.0.0 |
Eq ArithException Source # | Since: base-3.0 |
Defined in GHC.Exception.Type (==) :: ArithException -> ArithException -> Bool Source # (/=) :: ArithException -> ArithException -> Bool Source # | |
Eq SpecConstrAnnotation Source # | Since: base-4.3.0.0 |
Defined in GHC.Exts (==) :: SpecConstrAnnotation -> SpecConstrAnnotation -> Bool Source # (/=) :: SpecConstrAnnotation -> SpecConstrAnnotation -> Bool Source # | |
Eq Fingerprint Source # | Since: base-4.4.0.0 |
Defined in GHC.Fingerprint.Type (==) :: Fingerprint -> Fingerprint -> Bool Source # (/=) :: Fingerprint -> Fingerprint -> Bool Source # | |
Eq Associativity Source # | Since: base-4.6.0.0 |
Defined in GHC.Generics (==) :: Associativity -> Associativity -> Bool Source # (/=) :: Associativity -> Associativity -> Bool Source # | |
Eq DecidedStrictness Source # | Since: base-4.9.0.0 |
Defined in GHC.Generics (==) :: DecidedStrictness -> DecidedStrictness -> Bool Source # (/=) :: DecidedStrictness -> DecidedStrictness -> Bool Source # | |
Eq Fixity Source # | Since: base-4.6.0.0 |
Eq SourceStrictness Source # | Since: base-4.9.0.0 |
Defined in GHC.Generics (==) :: SourceStrictness -> SourceStrictness -> Bool Source # (/=) :: SourceStrictness -> SourceStrictness -> Bool Source # | |
Eq SourceUnpackedness Source # | Since: base-4.9.0.0 |
Defined in GHC.Generics (==) :: SourceUnpackedness -> SourceUnpackedness -> Bool Source # (/=) :: SourceUnpackedness -> SourceUnpackedness -> Bool Source # | |
Eq MaskingState Source # | Since: base-4.3.0.0 |
Defined in GHC.IO (==) :: MaskingState -> MaskingState -> Bool Source # (/=) :: MaskingState -> MaskingState -> Bool Source # | |
Eq BufferState Source # | Since: base-4.2.0.0 |
Defined in GHC.IO.Buffer (==) :: BufferState -> BufferState -> Bool Source # (/=) :: BufferState -> BufferState -> Bool Source # | |
Eq IODeviceType Source # | Since: base-4.2.0.0 |
Defined in GHC.IO.Device (==) :: IODeviceType -> IODeviceType -> Bool Source # (/=) :: IODeviceType -> IODeviceType -> Bool Source # | |
Eq SeekMode Source # | Since: base-4.2.0.0 |
Eq CodingProgress Source # | Since: base-4.4.0.0 |
Defined in GHC.IO.Encoding.Types (==) :: CodingProgress -> CodingProgress -> Bool Source # (/=) :: CodingProgress -> CodingProgress -> Bool Source # | |
Eq ArrayException Source # | Since: base-4.2.0.0 |
Defined in GHC.IO.Exception (==) :: ArrayException -> ArrayException -> Bool Source # (/=) :: ArrayException -> ArrayException -> Bool Source # | |
Eq AsyncException Source # | Since: base-4.2.0.0 |
Defined in GHC.IO.Exception (==) :: AsyncException -> AsyncException -> Bool Source # (/=) :: AsyncException -> AsyncException -> Bool Source # | |
Eq ExitCode Source # | |
Eq IOErrorType Source # | Since: base-4.1.0.0 |
Defined in GHC.IO.Exception (==) :: IOErrorType -> IOErrorType -> Bool Source # (/=) :: IOErrorType -> IOErrorType -> Bool Source # | |
Eq IOException Source # | Since: base-4.1.0.0 |
Defined in GHC.IO.Exception (==) :: IOException -> IOException -> Bool Source # (/=) :: IOException -> IOException -> Bool Source # | |
Eq HandlePosn Source # | Since: base-4.1.0.0 |
Defined in GHC.IO.Handle (==) :: HandlePosn -> HandlePosn -> Bool Source # (/=) :: HandlePosn -> HandlePosn -> Bool Source # | |
Eq BufferMode Source # | Since: base-4.2.0.0 |
Defined in GHC.IO.Handle.Types (==) :: BufferMode -> BufferMode -> Bool Source # (/=) :: BufferMode -> BufferMode -> Bool Source # | |
Eq Handle Source # | Since: base-4.1.0.0 |
Eq Newline Source # | Since: base-4.2.0.0 |
Eq NewlineMode Source # | Since: base-4.2.0.0 |
Defined in GHC.IO.Handle.Types (==) :: NewlineMode -> NewlineMode -> Bool Source # (/=) :: NewlineMode -> NewlineMode -> Bool Source # | |
Eq IOMode Source # | Since: base-4.2.0.0 |
Eq Int16 Source # | Since: base-2.1 |
Eq Int32 Source # | Since: base-2.1 |
Eq Int64 Source # | Since: base-2.1 |
Eq Int8 Source # | Since: base-2.1 |
Eq IoSubSystem Source # | |
Defined in GHC.RTS.Flags (==) :: IoSubSystem -> IoSubSystem -> Bool Source # (/=) :: IoSubSystem -> IoSubSystem -> Bool Source # | |
Eq SrcLoc Source # | Since: base-4.9.0.0 |
Eq SomeChar Source # | |
Eq SomeSymbol Source # | Since: base-4.7.0.0 |
Defined in GHC.TypeLits (==) :: SomeSymbol -> SomeSymbol -> Bool Source # (/=) :: SomeSymbol -> SomeSymbol -> Bool Source # | |
Eq SomeNat Source # | Since: base-4.7.0.0 |
Eq GeneralCategory Source # | Since: base-2.1 |
Defined in GHC.Unicode (==) :: GeneralCategory -> GeneralCategory -> Bool Source # (/=) :: GeneralCategory -> GeneralCategory -> Bool Source # | |
Eq Word16 Source # | Since: base-2.1 |
Eq Word32 Source # | Since: base-2.1 |
Eq Word64 Source # | Since: base-2.1 |
Eq Word8 Source # | Since: base-2.1 |
Eq CBlkCnt Source # | |
Eq CBlkSize Source # | |
Eq CCc Source # | |
Eq CClockId Source # | |
Eq CDev Source # | |
Eq CFsBlkCnt Source # | |
Eq CFsFilCnt Source # | |
Eq CGid Source # | |
Eq CId Source # | |
Eq CIno Source # | |
Eq CKey Source # | |
Eq CMode Source # | |
Eq CNfds Source # | |
Eq CNlink Source # | |
Eq COff Source # | |
Eq CPid Source # | |
Eq CRLim Source # | |
Eq CSocklen Source # | |
Eq CSpeed Source # | |
Eq CSsize Source # | |
Eq CTcflag Source # | |
Eq CTimer Source # | |
Eq CUid Source # | |
Eq Fd Source # | |
Eq Timeout Source # | |
Eq Lexeme Source # | Since: base-2.1 |
Eq Number Source # | Since: base-4.6.0.0 |
Eq BigNat | |
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 a => Eq (ZipList a) Source # | Since: base-4.7.0.0 |
Eq (Chan a) Source # | Since: base-4.4.0.0 |
Eq a => Eq (And a) Source # | Since: base-4.16 |
Eq a => Eq (Iff a) Source # | Since: base-4.16 |
Eq a => Eq (Ior a) Source # | Since: base-4.16 |
Eq a => Eq (Xor a) Source # | Since: base-4.16 |
Eq a => Eq (Complex a) Source # | Since: base-2.1 |
Eq a => Eq (Identity a) Source # | Since: base-4.8.0.0 |
Eq a => Eq (First a) Source # | Since: base-2.1 |
Eq a => Eq (Last a) Source # | Since: base-2.1 |
Eq a => Eq (Down a) Source # | Since: base-4.6.0.0 |
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 (Dual a) Source # | Since: base-2.1 |
Eq a => Eq (Product a) Source # | Since: base-2.1 |
Eq a => Eq (Sum a) Source # | Since: base-2.1 |
Eq a => Eq (NonEmpty a) Source # | Since: base-4.9.0.0 |
Eq (TVar a) Source # | Since: base-4.8.0.0 |
Eq (ForeignPtr a) Source # | Since: base-2.1 |
Defined in GHC.ForeignPtr (==) :: ForeignPtr a -> ForeignPtr a -> Bool Source # (/=) :: ForeignPtr a -> ForeignPtr a -> Bool Source # | |
Eq p => Eq (Par1 p) Source # | Since: base-4.7.0.0 |
Eq (IORef a) Source # | Pointer equality. Since: base-4.0.0.0 |
Eq (MVar a) Source # | Since: base-4.1.0.0 |
Eq (FunPtr a) Source # | |
Eq (Ptr a) Source # | Since: base-2.1 |
Eq a => Eq (Ratio a) Source # | Since: base-2.1 |
Eq (StablePtr a) Source # | Since: base-2.1 |
Eq (StableName a) Source # | Since: base-2.1 |
Defined in GHC.StableName (==) :: StableName a -> StableName a -> Bool Source # (/=) :: StableName a -> StableName a -> Bool Source # | |
Eq a => Eq (Maybe a) Source # | Since: base-2.1 |
Eq a => Eq [a] | |
(Eq a, Eq b) => Eq (Either a b) Source # | Since: base-2.1 |
Eq (Fixed a) Source # | Since: base-2.1 |
Eq (Proxy s) Source # | Since: base-4.7.0.0 |
Eq a => Eq (Arg a b) Source # | Since: base-4.9.0.0 |
Eq (TypeRep a) Source # | Since: base-2.1 |
(Ix i, Eq e) => Eq (Array i e) Source # | Since: base-2.1 |
Eq (U1 p) Source # | Since: base-4.9.0.0 |
Eq (V1 p) Source # | Since: base-4.9.0.0 |
Eq (IOArray i e) Source # | Since: base-4.1.0.0 |
Eq (STRef s a) Source # | Pointer equality. Since: base-2.1 |
(Eq a, Eq b) => Eq (a, b) | |
Eq a => Eq (Const a b) Source # | Since: base-4.9.0.0 |
Eq (f a) => Eq (Ap f a) Source # | Since: base-4.12.0.0 |
Eq (f a) => Eq (Alt f a) Source # | Since: base-4.8.0.0 |
Eq (Coercion a b) Source # | Since: base-4.7.0.0 |
Eq (a :~: b) Source # | Since: base-4.7.0.0 |
Eq (OrderingI a b) Source # | |
Eq (STArray s i e) Source # | Since: base-2.1 |
Eq (f p) => Eq (Rec1 f p) Source # | Since: base-4.7.0.0 |
Eq (URec (Ptr ()) p) Source # | Since: base-4.9.0.0 |
Eq (URec Char p) Source # | Since: base-4.9.0.0 |
Eq (URec Double p) Source # | Since: base-4.9.0.0 |
Eq (URec Float p) Source # | |
Eq (URec Int p) Source # | Since: base-4.9.0.0 |
Eq (URec Word p) Source # | Since: base-4.9.0.0 |
(Eq a, Eq b, Eq c) => Eq (a, b, c) | |
(Eq1 f, Eq1 g, Eq a) => Eq (Product f g a) Source # | Since: base-4.9.0.0 |
(Eq1 f, Eq1 g, Eq a) => Eq (Sum f g a) Source # | Since: base-4.9.0.0 |
Eq (a :~~: b) Source # | Since: base-4.10.0.0 |
(Eq (f p), Eq (g p)) => Eq ((f :*: g) p) Source # | Since: base-4.7.0.0 |
(Eq (f p), Eq (g p)) => Eq ((f :+: g) p) Source # | Since: base-4.7.0.0 |
Eq c => Eq (K1 i c p) Source # | Since: base-4.7.0.0 |
(Eq a, Eq b, Eq c, Eq d) => Eq (a, b, c, d) | |
(Eq1 f, Eq1 g, Eq a) => Eq (Compose f g a) Source # | Since: base-4.9.0.0 |
Eq (f (g p)) => Eq ((f :.: g) p) Source # | Since: base-4.7.0.0 |
Eq (f p) => Eq (M1 i c f p) Source # | 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) | |