Hoogle Search
Within LTS Haskell 24.52 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
-
singletons-base Control.Monad.Singletons No documentation available.
type family
DefaultEq (a :: k) (b :: k) :: Boolsingletons-base Data.Eq.Singletons One way to compute Boolean equality for types of any kind. This will return True if the two arguments are known to be the same type and False if they are known to be apart. Examples:
>>> DefaultEq Nothing Nothing True >>> DefaultEq Nothing (Just a) False >>> DefaultEq a a True
DefaultEq is most suited for data types that are not inductively defined. Four concrete examples of this are Natural, Symbol, Char, and Type. One cannot implement boolean equality for these types by pattern matching alone, so DefaultEq is a good fit instead. The downside to DefaultEq is that it can fail to reduce if it is unable to determine if two types are equal or apart. Here is one such example:DefaultEq (Just a) (Just b)
What should this reduce to? It depends on what a and b are. DefaultEq has no way of knowing what these two types are, and as a result, this type will be stuck. This is a pitfall that you can run into if you use DefaultEq to implement boolean equality for an inductive data type like Maybe. For this reason, it is usually recommended to implement boolean equality for inductive data types using pattern matching and recursion, not DefaultEq. Note that this definition is slightly different from the (==) type family from Data.Type.Equality in base, as (==) attempts to distinguish applications of type constructors from other types. As a result, a == a does not reduce to True for every a, but DefaultEq a a does reduce to True for every a. The latter behavior is more desirable for singletons' purposes, so we use it instead of (==).data
DefaultEqSym0 (a :: TyFun k k ~> Bool)singletons-base Data.Eq.Singletons No documentation available.
data
DefaultEqSym1 (a6989586621679146993 :: k) (b :: TyFun k Bool)singletons-base Data.Eq.Singletons No documentation available.
type family
DefaultEqSym2 (a6989586621679146993 :: k) (a6989586621679146994 :: k) :: Boolsingletons-base Data.Eq.Singletons No documentation available.
-
singletons-base Data.Eq.Singletons No documentation available.
-
singletons-base Data.Eq.Singletons No documentation available.
type family
SequenceA_ (a1 :: t f a) :: f ()singletons-base Data.Foldable.Singletons No documentation available.
data
SequenceA_Sym0 (a1 :: TyFun t f a f ())singletons-base Data.Foldable.Singletons No documentation available.
type family
SequenceA_Sym1 (a6989586621680407154 :: t f a) :: f ()singletons-base Data.Foldable.Singletons No documentation available.