| 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 |
Data.Eq
Description
Equality
TheEq class defines equality (==) and inequality (/=). All the basic datatypes exported by thePrelude are instances ofEq, andEq may be derived for any datatype whose constituents are also instances ofEq.
The Haskell Report defines no laws forEq. However,== is customarily expected to implement an equivalence relationship where two values comparing equal are indistinguishable by "public" functions, with a "public" function being one not allowing to see implementation details. For example, for a type representing non-normalised natural numbers modulo 100, a "public" function doesn't make the difference between 1 and 201. It is expected to have the following properties:
| EqBool | |
| EqChar | |
| EqDouble | Note that due to the presence of
Also note that
|
| EqFloat | Note that due to the presence of
Also note that
|
| EqInt | |
| EqInt8Source# | Since: 2.1 |
| EqInt16Source# | Since: 2.1 |
| EqInt32Source# | Since: 2.1 |
| EqInt64Source# | Since: 2.1 |
| EqInteger | |
| EqNaturalSource# | Since: 4.8.0.0 |
| EqOrdering | |
| EqWord | |
| EqWord8Source# | Since: 2.1 |
| EqWord16Source# | Since: 2.1 |
| EqWord32Source# | Since: 2.1 |
| EqWord64Source# | Since: 2.1 |
| EqSomeTypeRepSource# | |
Instance detailsDefined inData.Typeable.Internal | |
| Eq () | |
| EqTyCon | |
| EqModule | |
| EqTrName | |
| EqBigNat | |
| EqSrcLocSource# | Since: 4.9.0.0 |
| EqGeneralCategorySource# | Since: 2.1 |
| EqNumberSource# | Since: 4.6.0.0 |
| EqLexemeSource# | Since: 2.1 |
| EqFingerprintSource# | Since: 4.4.0.0 |
Instance detailsDefined inGHC.Fingerprint.Type | |
| EqIOModeSource# | Since: 4.2.0.0 |
| EqIntPtrSource# | |
| EqWordPtrSource# | |
| EqCUIntMaxSource# | |
| EqCIntMaxSource# | |
| EqCUIntPtrSource# | |
| EqCIntPtrSource# | |
| EqCSUSecondsSource# | |
Instance detailsDefined inForeign.C.Types | |
| EqCUSecondsSource# | |
| EqCTimeSource# | |
| EqCClockSource# | |
| EqCSigAtomicSource# | |
Instance detailsDefined inForeign.C.Types | |
| EqCWcharSource# | |
| EqCSizeSource# | |
| EqCPtrdiffSource# | |
| EqCDoubleSource# | |
| EqCFloatSource# | |
| EqCBoolSource# | |
| EqCULLongSource# | |
| EqCLLongSource# | |
| EqCULongSource# | |
| EqCLongSource# | |
| EqCUIntSource# | |
| EqCIntSource# | |
| EqCUShortSource# | |
| EqCShortSource# | |
| EqCUCharSource# | |
| EqCSCharSource# | |
| EqCCharSource# | |
| EqSomeNatSource# | Since: 4.7.0.0 |
| EqSomeSymbolSource# | Since: 4.7.0.0 |
Instance detailsDefined inGHC.TypeLits | |
| EqDecidedStrictnessSource# | Since: 4.9.0.0 |
| EqSourceStrictnessSource# | Since: 4.9.0.0 |
| EqSourceUnpackednessSource# | Since: 4.9.0.0 |
| EqAssociativitySource# | Since: 4.6.0.0 |
Instance detailsDefined inGHC.Generics | |
| EqFixitySource# | Since: 4.6.0.0 |
| EqAnySource# | Since: 2.1 |
| EqAllSource# | Since: 2.1 |
| EqArithExceptionSource# | Since: 3.0 |
Instance detailsDefined inGHC.Exception.Type | |
| EqErrorCallSource# | Since: 4.7.0.0 |
| EqIOExceptionSource# | Since: 4.1.0.0 |
Instance detailsDefined inGHC.IO.Exception | |
| EqMaskingStateSource# | Since: 4.3.0.0 |
Instance detailsDefined inGHC.IO | |
| EqBufferStateSource# | Since: 4.2.0.0 |
Instance detailsDefined inGHC.IO.Buffer | |
| EqCodingProgressSource# | Since: 4.4.0.0 |
Instance detailsDefined inGHC.IO.Encoding.Types | |
| EqSeekModeSource# | Since: 4.2.0.0 |
| EqIODeviceTypeSource# | Since: 4.2.0.0 |
Instance detailsDefined inGHC.IO.Device | |
| EqNewlineModeSource# | Since: 4.2.0.0 |
Instance detailsDefined inGHC.IO.Handle.Types | |
| EqNewlineSource# | Since: 4.2.0.0 |
| EqBufferModeSource# | Since: 4.2.0.0 |
Instance detailsDefined inGHC.IO.Handle.Types | |
| EqHandleSource# | Since: 4.1.0.0 |
| EqIOErrorTypeSource# | Since: 4.1.0.0 |
Instance detailsDefined inGHC.IO.Exception | |
| EqExitCodeSource# | |
| EqArrayExceptionSource# | Since: 4.2.0.0 |
Instance detailsDefined inGHC.IO.Exception | |
| EqAsyncExceptionSource# | Since: 4.2.0.0 |
Instance detailsDefined inGHC.IO.Exception | |
| EqErrnoSource# | Since: 2.1 |
| EqFdSource# | |
| EqCTimerSource# | |
| EqCKeySource# | |
| EqCIdSource# | |
| EqCFsFilCntSource# | |
| EqCFsBlkCntSource# | |
| EqCClockIdSource# | |
| EqCBlkCntSource# | |
| EqCBlkSizeSource# | |
| EqCRLimSource# | |
| EqCTcflagSource# | |
| EqCSpeedSource# | |
| EqCCcSource# | |
| EqCUidSource# | |
| EqCNlinkSource# | |
| EqCGidSource# | |
| EqCSsizeSource# | |
| EqCPidSource# | |
| EqCOffSource# | |
| EqCModeSource# | |
| EqCInoSource# | |
| EqCDevSource# | |
| EqLifetimeSource# | Since: 4.8.1.0 |
| EqEventSource# | Since: 4.4.0.0 |
| EqThreadStatusSource# | Since: 4.3.0.0 |
Instance detailsDefined inGHC.Conc.Sync | |
| EqBlockReasonSource# | Since: 4.3.0.0 |
Instance detailsDefined inGHC.Conc.Sync | |
| EqThreadIdSource# | Since: 4.2.0.0 |
| EqTimeoutKeySource# | Since: 4.7.0.0 |
Instance detailsDefined inGHC.Event.TimerManager | |
| EqFdKeySource# | Since: 4.4.0.0 |
| EqHandlePosnSource# | Since: 4.1.0.0 |
Instance detailsDefined inGHC.IO.Handle | |
| EqVersionSource# | Since: 2.1 |
| EqByteOrderSource# | Since: 4.11.0.0 |
| EqUniqueSource# | |
| EqFixitySource# | Since: 4.0.0.0 |
| EqConstrRepSource# | Since: 4.0.0.0 |
| EqDataRepSource# | Since: 4.0.0.0 |
| EqConstrSource# | Equality of constructors Since: 4.0.0.0 |
| EqSpecConstrAnnotationSource# | Since: 4.3.0.0 |
| EqVoidSource# | Since: 4.8.0.0 |
| Eq a =>Eq [a] | |
| Eq a =>Eq (Maybe a)Source# | Since: 2.1 |
| Eq a =>Eq (Ratio a)Source# | Since: 2.1 |
| Eq (StablePtr a)Source# | Since: 2.1 |
| Eq (Ptr a)Source# | Since: 2.1 |
| Eq (FunPtr a)Source# | |
| Eq p =>Eq (Par1 p)Source# | Since: 4.7.0.0 |
| Eq a =>Eq (NonEmpty a)Source# | Since: 4.9.0.0 |
| Eq (MVar a)Source# | Since: 4.1.0.0 |
| Eq a =>Eq (Down a)Source# | Since: 4.6.0.0 |
| Eq a =>Eq (Product a)Source# | Since: 2.1 |
| Eq a =>Eq (Sum a)Source# | Since: 2.1 |
| Eq a =>Eq (Dual a)Source# | Since: 2.1 |
| Eq a =>Eq (Last a)Source# | Since: 2.1 |
| Eq a =>Eq (First a)Source# | Since: 2.1 |
| Eq (IORef a)Source# | ^ Pointer equality. Since: 4.1.0.0 |
| Eq (ForeignPtr a)Source# | Since: 2.1 |
Instance detailsDefined inGHC.ForeignPtr | |
| Eq (TVar a)Source# | Since: 4.8.0.0 |
| Eq a =>Eq (Identity a)Source# | Since: 4.8.0.0 |
| Eq a =>Eq (ZipList a)Source# | Since: 4.7.0.0 |
| Eq (StableName a)Source# | Since: 2.1 |
Instance detailsDefined inGHC.StableName | |
| Eq (Chan a)Source# | Since: 4.4.0.0 |
| Eq a =>Eq (Option a)Source# | Since: 4.9.0.0 |
| Eq m =>Eq (WrappedMonoid m)Source# | Since: 4.9.0.0 |
Instance detailsDefined inData.Semigroup Methods (==) ::WrappedMonoid m ->WrappedMonoid m ->Bool# (/=) ::WrappedMonoid m ->WrappedMonoid m ->Bool# | |
| Eq a =>Eq (Last a)Source# | Since: 4.9.0.0 |
| Eq a =>Eq (First a)Source# | Since: 4.9.0.0 |
| Eq a =>Eq (Max a)Source# | Since: 4.9.0.0 |
| Eq a =>Eq (Min a)Source# | Since: 4.9.0.0 |
| Eq (Fixed a)Source# | Since: 2.1 |
| Eq a =>Eq (Complex a)Source# | Since: 2.1 |
| (Eq a,Eq b) =>Eq (Either a b)Source# | Since: 2.1 |
| Eq (V1 p)Source# | Since: 4.9.0.0 |
| Eq (U1 p)Source# | Since: 4.9.0.0 |
| Eq (TypeRep a)Source# | Since: 2.1 |
| (Eq a,Eq b) =>Eq (a, b) | |
| Eq (STRef s a)Source# | Pointer equality. Since: 2.1 |
| Eq (Proxy s)Source# | Since: 4.7.0.0 |
| Eq a =>Eq (Arg a b)Source# | Since: 4.9.0.0 |
| Eq (f p) =>Eq (Rec1 f p)Source# | Since: 4.7.0.0 |
| Eq (URecWord p)Source# | Since: 4.9.0.0 |
| Eq (URecInt p)Source# | Since: 4.9.0.0 |
| Eq (URecFloat p)Source# | |
| Eq (URecDouble p)Source# | Since: 4.9.0.0 |
| Eq (URecChar p)Source# | Since: 4.9.0.0 |
| Eq (URec (Ptr ()) p)Source# | Since: 4.9.0.0 |
| (Eq a,Eq b,Eq c) =>Eq (a, b, c) | |
| Eq (a:~: b)Source# | Since: 4.7.0.0 |
| Eq (Coercion a b)Source# | Since: 4.7.0.0 |
| Eq (f a) =>Eq (Alt f a)Source# | Since: 4.8.0.0 |
| Eq (f a) =>Eq (Ap f a)Source# | Since: 4.12.0.0 |
| Eq a =>Eq (Const a b)Source# | Since: 4.9.0.0 |
| Eq c =>Eq (K1 i c p)Source# | Since: 4.7.0.0 |
| (Eq (f p),Eq (g p)) =>Eq ((f:+: g) p)Source# | Since: 4.7.0.0 |
| (Eq (f p),Eq (g p)) =>Eq ((f:*: g) p)Source# | Since: 4.7.0.0 |
| (Eq a,Eq b,Eq c,Eq d) =>Eq (a, b, c, d) | |
| Eq (a:~~: b)Source# | Since: 4.10.0.0 |
| (Eq1 f,Eq1 g,Eq a) =>Eq (Sum f g a)Source# | Since: 4.9.0.0 |
| (Eq1 f,Eq1 g,Eq a) =>Eq (Product f g a)Source# | Since: 4.9.0.0 |
| Eq (f p) =>Eq (M1 i c f p)Source# | Since: 4.7.0.0 |
| Eq (f (g p)) =>Eq ((f:.: g) p)Source# | Since: 4.7.0.0 |
| (Eq a,Eq b,Eq c,Eq d,Eq e) =>Eq (a, b, c, d, e) | |
| (Eq1 f,Eq1 g,Eq a) =>Eq (Compose f g a)Source# | Since: 4.9.0.0 |
| (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) | |
Produced byHaddock version 2.20.0