HList-0.5.1.0: Heterogeneous lists
Safe HaskellNone
LanguageHaskell2010

Data.HList.FakePrelude

Contents

Description

The HList library

(C) 2004, Oleg Kiselyov, Ralf Laemmel, Keean Schupke

Some very basic technology for faking dependent types in Haskell.

Synopsis

Documentation

data ErrorMessage #

A description of a custom type error.

Constructors

ErrorMessage :<>: ErrorMessage infixl 6

Put two pieces of error message next to each other.

ErrorMessage :$$: ErrorMessage infixl 5

Stack two pieces of error message on top of each other.

Instances

Instances details
(TypeError x :: Constraint) => Fail (x :: ErrorMessage) Source # 
Instance details

Defined in Data.HList.FakePrelude

type family ZipTagged (ts :: [k]) (vs :: [*]) :: [*] Source #

see Data.HList.Record.zipTagged

Instances

Instances details
type ZipTagged ('[] :: [k]) ('[] :: [Type]) Source # 
Instance details

Defined in Data.HList.FakePrelude

type ZipTagged ('[] :: [k]) ('[] :: [Type]) = '[] :: [Type]
type ZipTagged (t ': ts :: [Symbol]) (v ': vs) Source # 
Instance details

Defined in Data.HList.FakePrelude

type ZipTagged (t ': ts :: [Symbol]) (v ': vs) = Tagged t v ': ZipTagged ts vs
type ZipTagged (Label t ': ts :: [Type]) (v ': vs) Source # 
Instance details

Defined in Data.HList.FakePrelude

type ZipTagged (Label t ': ts :: [Type]) (v ': vs) = Tagged t v ': ZipTagged ts vs
type ZipTagged (Lbl ix ns n ': ts :: [Type]) (v ': vs) Source # 
Instance details

Defined in Data.HList.Label3

type ZipTagged (Lbl ix ns n ': ts :: [Type]) (v ': vs) = Tagged (Lbl ix ns n) v ': ZipTagged ts vs

class HAllTaggedLV (ps :: [*]) Source #

The Record, Variant, TIP, TIC type constructors only make sense when they are applied to an instance of this class

Instances

Instances details
HAllTaggedLV ('[] :: [Type]) Source # 
Instance details

Defined in Data.HList.FakePrelude

(HAllTaggedLV xs, x ~ Tagged t v) => HAllTaggedLV (x ': xs) Source # 
Instance details

Defined in Data.HList.FakePrelude

class SameLabels (x :: k) (y :: m) Source #

Instances

Instances details
SameLabels (Label t) s => SameLabels (t :: Symbol) (s :: m) Source # 
Instance details

Defined in Data.HList.FakePrelude

Label t ~ Label t' => SameLabels (Label t :: Type) (t' :: Symbol) Source # 
Instance details

Defined in Data.HList.FakePrelude

SameLabels (Label t) s => SameLabels (Tagged t a :: Type) (s :: m) Source # 
Instance details

Defined in Data.HList.FakePrelude

SameLabels ('[] :: [k1]) ('[] :: [k2]) Source # 
Instance details

Defined in Data.HList.FakePrelude

SameLabels ('[] :: [k]) (x ': xs :: [a]) Source # 
Instance details

Defined in Data.HList.FakePrelude

Label t ~ Label t' => SameLabels (Label t :: Type) (Label t' :: Type) Source # 
Instance details

Defined in Data.HList.FakePrelude

Label t ~ Label t' => SameLabels (Label t :: Type) (Tagged t' a :: Type) Source # 
Instance details

Defined in Data.HList.FakePrelude

Label t ~ Label (Lbl ix ns n) => SameLabels (Label t :: Type) (Lbl ix ns n :: Type) Source # 
Instance details

Defined in Data.HList.Label3

SameLabels (x ': xs :: [a]) ('[] :: [k]) Source # 
Instance details

Defined in Data.HList.FakePrelude

(SameLabels x y, SameLabels xs ys) => SameLabels (x ': xs :: [a1]) (y ': ys :: [a2]) Source # 
Instance details

Defined in Data.HList.FakePrelude

type family SameLengths (xs :: [[k]]) :: Constraint Source #

Instances

Instances details
type SameLengths ('[] :: [[k]]) Source # 
Instance details

Defined in Data.HList.FakePrelude

type SameLengths ('[] :: [[k]]) = ()
type SameLengths ('[x] :: [[k]]) Source # 
Instance details

Defined in Data.HList.FakePrelude

type SameLengths ('[x] :: [[k]]) = ()
type SameLengths (x ': (y ': ys) :: [[k]]) Source # 
Instance details

Defined in Data.HList.FakePrelude

type SameLengths (x ': (y ': ys) :: [[k]]) = (SameLength x y, SameLengths (y ': ys))

class (SameLength' x y, SameLength' y x) => SameLength (x :: [k]) (y :: [m]) where Source #

symmetrical version of SameLength'. Written as a class instead of

type SameLength a b = (SameLength' a b, SameLength' b a)

since ghc expands type synonyms, but not classes (and it seems to have the same result)

Minimal complete definition

Nothing

Methods

sameLength :: (r x `p` f (q y)) -> r x `p` f (q y) Source #

SameLength x y => Equality (r x) (q y) (r x) (q y)

used like simple, except it restricts the type-level lists involved to have the same length, without fixing the type of container or the elements in the list.

Instances

Instances details
(SameLength' x y, SameLength' y x) => SameLength (x :: [k]) (y :: [m]) Source # 
Instance details

Defined in Data.HList.FakePrelude

Methods

sameLength :: forall k0 k1 k2 p (r :: [k3] -> k0) (f :: k2 -> k1) (q :: [m0] -> k2). p (r x) (f (q y)) -> p (r x) (f (q y)) Source #

class SameLength' (es1 :: [k]) (es2 :: [m]) Source #

Ensure two lists have the same length. We do case analysis on the first one (hence the type must be known to the type checker). In contrast, the second list may be a type variable.

Instances

Instances details
es2 ~ ('[] :: [m]) => SameLength' ('[] :: [k]) (es2 :: [m]) Source # 
Instance details

Defined in Data.HList.FakePrelude

(SameLength' xs ys, es2 ~ (y ': ys)) => SameLength' (x ': xs :: [k]) (es2 :: [m]) Source # 
Instance details

Defined in Data.HList.FakePrelude

type TypeablePolyK (a :: k) = Typeable a Source #

type ExtraField x = ErrText "extra field" :<>: ErrShowType x Source #

type HNatIndexTooLarge (nat :: HNat) (r :: [k] -> *) (xs :: [k]) = ((ErrText "0-based index" :<>: ErrShowType (HNat2Nat nat)) :<>: ErrText "is too large for collection") :$$: ErrShowType (r xs) Source #

type ExcessFieldFound key collection = (ErrText "found field" :<>: ErrShowType key) :$$: (ErrText "when it should be absent from" :<>: ErrShowType collection) Source #

type FieldNotFound key collection = (ErrText "key" :<>: ErrShowType key) :$$: (ErrText "could not be found in" :<>: ErrShowType collection) Source #

type ErrText x = Text x Source #

use the alias ErrText to prevent conflicts with Data.Text

GHC.TypeLits.:<>: and GHC.TypeLits.:$$: are re-exported

class Fail (x :: k) Source #

A class without instances for explicit failure.

Note that with ghc>=8.0, `x :: TypeError` which is formatted properly. Otherwise x is made of nested (left-associated) promoted tuples. For example:

(x ~ '( '( '("the", Int), "is wrong") ) ) :: ((,) Symbol *, Symbol)

Therefore code that works across ghc-7.6 through ghc-8.0 needs to use ErrText, ErrShowType, :<>:, :$$: to construct the type x.

Instances

Instances details
(TypeError x :: Constraint) => Fail (x :: ErrorMessage) Source # 
Instance details

Defined in Data.HList.FakePrelude

class HCast1 (b :: Bool) x y where Source #

helper for HCast

Methods

hCast1 :: Proxy b -> x -> Maybe y Source #

Instances

Instances details
HCast1 'False x y Source # 
Instance details

Defined in Data.HList.FakePrelude

Methods

hCast1 :: Proxy 'False -> x -> Maybe y Source #

x ~ y => HCast1 'True x y Source # 
Instance details

Defined in Data.HList.FakePrelude

Methods

hCast1 :: Proxy 'True -> x -> Maybe y Source #

class HCast x y where Source #

Named after cast, which behaves the same at runtime. One difference is that there is a HCast instance for every type, while Typeable instances can be missing sometimes.

Methods

hCast :: x -> Maybe y Source #

Instances

Instances details
(HEq x y b, HCast1 b x y) => HCast x y Source # 
Instance details

Defined in Data.HList.FakePrelude

Methods

hCast :: x -> Maybe y Source #

class ArityRev (f :: *) (n :: HNat) Source #

given the number of arguments a function can take, make sure the function type actually matches

Instances

Instances details
ArityRev f 'HZero Source # 
Instance details

Defined in Data.HList.FakePrelude

(xf ~ (x -> f), ArityRev f n) => ArityRev xf ('HSucc n) Source # 
Instance details

Defined in Data.HList.FakePrelude

class ArityFwd (f :: *) (n :: HNat) | f -> n Source #

calculate the number of arguments a function can take

Instances

Instances details
hZero ~ 'HZero => ArityFwd f hZero Source # 
Instance details

Defined in Data.HList.TypeEqO

Arity f n => ArityFwd (x -> f) ('HSucc n) Source # 
Instance details

Defined in Data.HList.TypeEqO

type Arity f n = (ArityFwd f n, ArityRev f n) Source #

class HEqByFn f Source #

Every instance of this class should have an instance of HEqBy

Instances

Instances details
HEqByFn HLeFn Source # 
Instance details

Defined in Data.HList.HSort

HEqByFn EqTagValue Source # 
Instance details

Defined in Data.HList.RecordU

HEqByFn a => HEqByFn (HNeq a :: Type) Source # 
Instance details

Defined in Data.HList.HSort

HEqByFn a => HEqByFn (HDown a :: Type) Source # 
Instance details

Defined in Data.HList.HSort

class HEqByFn f => HEqBy (f :: t) (x :: k) (y :: k) (b :: Bool) | f x y -> b Source #

this class generalizes HEq by allowing the choice of f to allow equating only part of x and y

Instances

Instances details
(x <=? y) ~ b => HEqBy HLeFn (x :: Nat) (y :: Nat) b Source #

only in ghc >= 7.7

Instance details

Defined in Data.HList.HSort

(HEq (CmpSymbol x y) 'GT nb, HNot nb ~ b) => HEqBy HLeFn (x :: Symbol) (y :: Symbol) b Source #

only in ghc >= 7.7

>>> let b1 = Proxy :: HEqBy HLeFn "x" "y" b => Proxy b
>>> :t b1
b1 :: Proxy 'True
>>> let b2 = Proxy :: HEqBy HLeFn "x" "x" b => Proxy b
>>> :t b2
b2 :: Proxy 'True
>>> let b3 = Proxy :: HEqBy HLeFn "y" "x" b => Proxy b
>>> :t b3
b3 :: Proxy 'False
Instance details

Defined in Data.HList.HSort

HLe x y ~ b => HEqBy HLeFn (x :: HNat) (y :: HNat) b Source # 
Instance details

Defined in Data.HList.HSort

HEqBy f y x b => HEqBy (HDown f :: Type) (x :: k2) (y :: k2) b Source # 
Instance details

Defined in Data.HList.HSort

(HEqBy le y x b1, HNot b1 ~ b2) => HEqBy (HNeq le :: Type) (x :: k2) (y :: k2) b2 Source # 
Instance details

Defined in Data.HList.HSort

(txv ~ Tagged x v, tyw ~ Tagged y w, HEq v w b) => HEqBy EqTagValue (txv :: Type) (tyw :: Type) b Source # 
Instance details

Defined in Data.HList.RecordU

HEqBy HLeFn x y b => HEqBy HLeFn (Proxy x :: Type) (Proxy y :: Type) b Source # 
Instance details

Defined in Data.HList.HSort

HEqBy HLeFn x y b => HEqBy HLeFn (Label x :: Type) (Label y :: Type) b Source # 
Instance details

Defined in Data.HList.HSort

HEqBy HLeFn x y b => HEqBy HLeFn (Tagged x v :: Type) (Tagged y w :: Type) b Source # 
Instance details

Defined in Data.HList.HSort

(HEqBy HLeFn n m b, ns ~ ns') => HEqBy HLeFn (Lbl n ns desc :: Type) (Lbl m ns' desc' :: Type) b Source #

Data.HList.Label3 labels can only be compared if they belong to the same namespace.

Instance details

Defined in Data.HList.HSort

type HEqK (x :: k1) (y :: k2) (b :: Bool) = HEq (Proxy x) (Proxy y) b Source #

Equality for types that may have different kinds. This definition allows operations on Record [Tagged "x" a, Tagged 2 b] to work as expected.

class HEq (x :: k) (y :: k) (b :: Bool) | x y -> b Source #

We have to use Functional dependencies for now, for the sake of the generic equality.

Instances

Instances details
'False ~ b => HEq (x :: k) (y :: k) b Source # 
Instance details

Defined in Data.HList.TypeEqO

HEq (x :: k) (x :: k) 'True Source # 
Instance details

Defined in Data.HList.TypeEqO

newtype HJust x Source #

Constructors

HJust x 

Instances

Instances details
(Apply p s, HUnfoldFD p (ApplyR p s) z) => HUnfoldFD p (HJust (e, s)) (e ': z) Source # 
Instance details

Defined in Data.HList.HList

Methods

hUnfold' :: p -> HJust (e, s) -> HList (e ': z) Source #

Show x => Show (HJust x) Source # 
Instance details

Defined in Data.HList.FakePrelude

Methods

showsPrec :: Int -> HJust x -> ShowS #

show :: HJust x -> String #

showList :: [HJust x] -> ShowS #

hJustA ~ HJust a => ApplyAB (HJust t) a hJustA Source #

HJust () is a placeholder for a function that applies the HJust constructor

Instance details

Defined in Data.HList.FakePrelude

Methods

applyAB :: HJust t -> a -> hJustA Source #

FromHJust l => FromHJust (HJust e ': l) Source # 
Instance details

Defined in Data.HList.HList

Associated Types

type FromHJustR (HJust e ': l) :: [Type] Source #

Methods

fromHJust :: HList (HJust e ': l) -> HList (FromHJustR (HJust e ': l)) Source #

type HUnfoldR p (HJust (e, s)) Source # 
Instance details

Defined in Data.HList.HList

type HUnfoldR p (HJust (e, s)) = e ': HUnfoldR p (ApplyR p s)
type FromHJustR (HJust e ': l) Source # 
Instance details

Defined in Data.HList.HList

type FromHJustR (HJust e ': l) = e ': FromHJustR l

data HNothing Source #

Constructors

HNothing 

Instances

Instances details
Show HNothing Source # 
Instance details

Defined in Data.HList.FakePrelude

HUnfoldFD p HNothing ('[] :: [Type]) Source # 
Instance details

Defined in Data.HList.HList

Methods

hUnfold' :: p -> HNothing -> HList '[] Source #

FromHJust l => FromHJust (HNothing ': l) Source # 
Instance details

Defined in Data.HList.HList

Associated Types

type FromHJustR (HNothing ': l) :: [Type] Source #

Methods

fromHJust :: HList (HNothing ': l) -> HList (FromHJustR (HNothing ': l)) Source #

type HUnfoldR p HNothing Source # 
Instance details

Defined in Data.HList.HList

type HUnfoldR p HNothing = '[] :: [Type]
type FromHJustR (HNothing ': l) Source # 
Instance details

Defined in Data.HList.HList

type family HDiv2 (x :: HNat) :: HNat Source #

HDiv2 x behaves like x div 2

Instances

Instances details
type HDiv2 'HZero Source # 
Instance details

Defined in Data.HList.FakePrelude

type HDiv2 'HZero = 'HZero
type HDiv2 ('HSucc 'HZero) Source # 
Instance details

Defined in Data.HList.FakePrelude

type HDiv2 ('HSucc 'HZero) = 'HZero
type HDiv2 ('HSucc ('HSucc a)) Source # 
Instance details

Defined in Data.HList.FakePrelude

type HDiv2 ('HSucc ('HSucc a)) = 'HSucc (HDiv2 a)

type family HLe (x :: HNat) (y :: HNat) :: Bool Source #

Less than or equal to

Instances

Instances details
type HLe 'HZero 'HZero Source # 
Instance details

Defined in Data.HList.FakePrelude

type HLe 'HZero 'HZero = 'True
type HLe ('HSucc x) y Source # 
Instance details

Defined in Data.HList.FakePrelude

type HLe ('HSucc x) y = HLt x y

type family HLt (x :: HNat) (y :: HNat) :: Bool Source #

Less than

Instances

Instances details
type HLt 'HZero 'HZero Source # 
Instance details

Defined in Data.HList.FakePrelude

type HLt 'HZero 'HZero = 'False
type HLt 'HZero ('HSucc n) Source # 
Instance details

Defined in Data.HList.FakePrelude

type HLt 'HZero ('HSucc n) = 'True
type HLt ('HSucc n) 'HZero Source # 
Instance details

Defined in Data.HList.FakePrelude

type HLt ('HSucc n) 'HZero = 'False
type HLt ('HSucc n) ('HSucc n') Source # 
Instance details

Defined in Data.HList.FakePrelude

type HLt ('HSucc n) ('HSucc n') = HLt n n'

type family HNatEq (t1 :: HNat) (t2 :: HNat) :: Bool Source #

Equality on natural numbers (eventually to be subsumed by the universal polykinded HEq)

Instances

Instances details
type HNatEq 'HZero 'HZero Source # 
Instance details

Defined in Data.HList.FakePrelude

type HNatEq 'HZero ('HSucc n) Source # 
Instance details

Defined in Data.HList.FakePrelude

type HNatEq 'HZero ('HSucc n) = 'False
type HNatEq ('HSucc n) 'HZero Source # 
Instance details

Defined in Data.HList.FakePrelude

type HNatEq ('HSucc n) 'HZero = 'False
type HNatEq ('HSucc n) ('HSucc n') Source # 
Instance details

Defined in Data.HList.FakePrelude

type HNatEq ('HSucc n) ('HSucc n') = HNatEq n n'

class HNats2Integrals (ns :: [HNat]) where Source #

Methods

hNats2Integrals :: Integral i => Proxy ns -> [i] Source #

Instances

Instances details
HNats2Integrals ('[] :: [HNat]) Source # 
Instance details

Defined in Data.HList.FakePrelude

Methods

hNats2Integrals :: Integral i => Proxy '[] -> [i] Source #

(HNats2Integrals ns, HNat2Integral n) => HNats2Integrals (n ': ns) Source # 
Instance details

Defined in Data.HList.FakePrelude

Methods

hNats2Integrals :: Integral i => Proxy (n ': ns) -> [i] Source #

type family HNat2Nat (n :: HNat) :: Nat Source #

Instances

Instances details
type HNat2Nat 'HZero Source # 
Instance details

Defined in Data.HList.FakePrelude

type HNat2Nat 'HZero = 0
type HNat2Nat ('HSucc n) Source # 
Instance details

Defined in Data.HList.FakePrelude

type HNat2Nat ('HSucc n) = 1 + HNat2Nat n

class HNat2Integral (n :: HNat) where Source #

Methods

hNat2Integral :: Integral i => Proxy n -> i Source #

Instances

Instances details
KnownNat (HNat2Nat n) => HNat2Integral n Source # 
Instance details

Defined in Data.HList.FakePrelude

Methods

hNat2Integral :: Integral i => Proxy n -> i Source #

data HNat Source #

The data type to be lifted to the type level

Constructors

HZero 
HSucc HNat 

Instances

Instances details
xxs ~ ('[] :: [Type]) => HLengthEq1 xxs 'HZero Source # 
Instance details

Defined in Data.HList.HList

(HLengthEq xs n, xxs ~ (x ': xs)) => HLengthEq1 xxs ('HSucc n :: HNat) Source # 
Instance details

Defined in Data.HList.HList

zero ~ 'HZero => HLengthEq2 ('[] :: [Type]) (zero :: HNat) Source # 
Instance details

Defined in Data.HList.HList

HFindMany ('[] :: [k]) (r :: [k]) ('[] :: [HNat]) Source # 
Instance details

Defined in Data.HList.RecordU

(HLengthEq xs n, sn ~ 'HSucc n) => HLengthEq2 (x ': xs) (sn :: HNat) Source # 
Instance details

Defined in Data.HList.HList

(HFind l r n, HFindMany ls r ns) => HFindMany (l ': ls :: [k]) (r :: [k]) (n ': ns) Source # 
Instance details

Defined in Data.HList.RecordU

HNats2Integrals ('[] :: [HNat]) Source # 
Instance details

Defined in Data.HList.FakePrelude

Methods

hNats2Integrals :: Integral i => Proxy '[] -> [i] Source #

HLe x y ~ b => HEqBy HLeFn (x :: HNat) (y :: HNat) b Source # 
Instance details

Defined in Data.HList.HSort

HTypes2HNats ('[] :: [Type]) (l :: [Type]) ('[] :: [HNat]) Source #

And lift to the list of types

Instance details

Defined in Data.HList.HTypeIndexed

(HType2HNat e l n, HTypes2HNats es l ns) => HTypes2HNats (e ': es :: [Type]) (l :: [Type]) (n ': ns) Source # 
Instance details

Defined in Data.HList.HTypeIndexed

HLookupByHNat n l => Apply (FHLookupByHNat l) (Proxy n) Source # 
Instance details

Defined in Data.HList.HArray

Associated Types

type ApplyR (FHLookupByHNat l) (Proxy n) Source #

HNat2Integral n => Show (Proxy n) Source # 
Instance details

Defined in Data.HList.TypeEqO

Methods

showsPrec :: Int -> Proxy n -> ShowS #

show :: Proxy n -> String #

showList :: [Proxy n] -> ShowS #

Apply (FHUProj sel ns) (HList l, Proxy ('HSucc n)) => Apply (Proxy 'False, FHUProj sel ns) (HList (e ': l), Proxy n) Source # 
Instance details

Defined in Data.HList.HArray

Associated Types

type ApplyR (Proxy 'False, FHUProj sel ns) (HList (e ': l), Proxy n) Source #

Methods

apply :: (Proxy 'False, FHUProj sel ns) -> (HList (e ': l), Proxy n) -> ApplyR (Proxy 'False, FHUProj sel ns) (HList (e ': l), Proxy n) Source #

Apply (Proxy 'True, FHUProj sel ns) (HList (e ': l), Proxy n) Source # 
Instance details

Defined in Data.HList.HArray

Associated Types

type ApplyR (Proxy 'True, FHUProj sel ns) (HList (e ': l), Proxy n) Source #

Methods

apply :: (Proxy 'True, FHUProj sel ns) -> (HList (e ': l), Proxy n) -> ApplyR (Proxy 'True, FHUProj sel ns) (HList (e ': l), Proxy n) Source #

(ch ~ Proxy (HBoolEQ sel (KMember n ns)), Apply (ch, FHUProj sel ns) (HList (e ': l), Proxy n)) => Apply (FHUProj sel ns) (HList (e ': l), Proxy n) Source # 
Instance details

Defined in Data.HList.HArray

Associated Types

type ApplyR (FHUProj sel ns) (HList (e ': l), Proxy n) Source #

Methods

apply :: FHUProj sel ns -> (HList (e ': l), Proxy n) -> ApplyR (FHUProj sel ns) (HList (e ': l), Proxy n) Source #

(HNats2Integrals ns, HNat2Integral n) => HNats2Integrals (n ': ns) Source # 
Instance details

Defined in Data.HList.FakePrelude

Methods

hNats2Integrals :: Integral i => Proxy (n ': ns) -> [i] Source #

(HNat2Integral n, HLookupByHNatR n u ~ le, le ~ Tagged l e, IArray UArray e, e ~ GetElemTy u) => HLookupByHNatUS1 ('Left t :: Either HNat HNat) n u us le Source # 
Instance details

Defined in Data.HList.RecordU

Methods

hLookupByHNatUS1 :: Proxy ('Left t) -> Proxy n -> RecordU u -> HList us -> le Source #

HLookupByHNatUS t us e => HLookupByHNatUS1 ('Right t :: Either HNat HNat) n u us e Source # 
Instance details

Defined in Data.HList.RecordU

Methods

hLookupByHNatUS1 :: Proxy ('Right t) -> Proxy n -> RecordU u -> HList us -> e Source #

type KMember n ('[] :: [HNat]) Source # 
Instance details

Defined in Data.HList.HArray

type KMember n ('[] :: [HNat]) = 'False
type KMember n (n1 ': l) Source # 
Instance details

Defined in Data.HList.HArray

type KMember n (n1 ': l) = HOr (HNatEq n n1) (KMember n l)
type ApplyR (FHLookupByHNat l) (Proxy n) Source # 
Instance details

Defined in Data.HList.HArray

type ApplyR (Proxy 'False, FHUProj sel ns) (HList (e ': l), Proxy n) Source # 
Instance details

Defined in Data.HList.HArray

type ApplyR (Proxy 'False, FHUProj sel ns) (HList (e ': l), Proxy n) = ApplyR (FHUProj sel ns) (HList l, Proxy ('HSucc n))
type ApplyR (Proxy 'True, FHUProj sel ns) (HList (e ': l), Proxy n) Source # 
Instance details

Defined in Data.HList.HArray

type ApplyR (Proxy 'True, FHUProj sel ns) (HList (e ': l), Proxy n) = HJust (e, (HList l, Proxy ('HSucc n)))
type ApplyR (FHUProj sel ns) (HList (e ': l), Proxy n) Source # 
Instance details

Defined in Data.HList.HArray

type ApplyR (FHUProj sel ns) (HList (e ': l), Proxy n) = ApplyR (Proxy (HBoolEQ sel (KMember n ns)), FHUProj sel ns) (HList (e ': l), Proxy n)
type HNats (Proxy n ': l) Source # 
Instance details

Defined in Data.HList.HList

type HNats (Proxy n ': l) = n ': HNats l

type family HBoolEQ (t1 :: Bool) (t2 :: Bool) :: Bool Source #

Instances

Instances details
type HBoolEQ 'False 'False Source # 
Instance details

Defined in Data.HList.FakePrelude

type HBoolEQ 'False 'True Source # 
Instance details

Defined in Data.HList.FakePrelude

type HBoolEQ 'True 'False Source # 
Instance details

Defined in Data.HList.FakePrelude

type HBoolEQ 'True 'True Source # 
Instance details

Defined in Data.HList.FakePrelude

type HBoolEQ 'True 'True = 'True

class HCond (t :: Bool) x y z | t x y -> z where Source #

Methods

hCond :: Proxy t -> x -> y -> z Source #

Instances

Instances details
HCond 'False x y y Source # 
Instance details

Defined in Data.HList.FakePrelude

Methods

hCond :: Proxy 'False -> x -> y -> y Source #

HCond 'True x y x Source # 
Instance details

Defined in Data.HList.FakePrelude

Methods

hCond :: Proxy 'True -> x -> y -> x Source #

class HNotFD (b :: Bool) (nb :: Bool) | b -> nb, nb -> b Source #

as compared with HNot this version is injective

Instances

Instances details
HNotFD 'False 'True Source # 
Instance details

Defined in Data.HList.FakePrelude

HNotFD 'True 'False Source # 
Instance details

Defined in Data.HList.FakePrelude

type family HNot (x :: Bool) :: Bool Source #

Instances

Instances details
type HNot 'False Source # 
Instance details

Defined in Data.HList.FakePrelude

type HNot 'False = 'True
type HNot 'True Source # 
Instance details

Defined in Data.HList.FakePrelude

type HNot 'True = 'False

type family HOr (t1 :: Bool) (t2 :: Bool) :: Bool Source #

Instances

Instances details
type HOr 'False t Source # 
Instance details

Defined in Data.HList.FakePrelude

type HOr 'False t = t
type HOr 'True t Source # 
Instance details

Defined in Data.HList.FakePrelude

type HOr 'True t = 'True

type family HAnd (t1 :: Bool) (t2 :: Bool) :: Bool Source #

Instances

Instances details
type HAnd 'False t Source # 
Instance details

Defined in Data.HList.FakePrelude

type HAnd 'False t = 'False
type HAnd 'True t Source # 
Instance details

Defined in Data.HList.FakePrelude

type HAnd 'True t = t

class ShowLabel l where Source #

Methods

showLabel :: Label l -> String Source #

Instances

Instances details
KnownNat x => ShowLabel (x :: Nat) Source # 
Instance details

Defined in Data.HList.Label6

Methods

showLabel :: Label x -> String Source #

KnownSymbol x => ShowLabel (x :: Symbol) Source # 
Instance details

Defined in Data.HList.Label6

Methods

showLabel :: Label x -> String Source #

Typeable x => ShowLabel (x :: Type) Source #

Equality on labels

Show label

Instance details

Defined in Data.HList.Label5

Methods

showLabel :: Label x -> String Source #

Show desc => ShowLabel (Lbl x ns desc :: Type) Source #

Equality on labels (descriptions are ignored) Use generic instance

Show label

Instance details

Defined in Data.HList.Label3

Methods

showLabel :: Label (Lbl x ns desc) -> String Source #

data Label l Source #

A special Proxy for record labels, polykinded

Constructors

Label 

Instances

Instances details
(HasField l (Record r) u, HasFieldPath needJust ls u v) => HasFieldPath needJust (Label l ': ls) (Record r) v Source # 
Instance details

Defined in Data.HList.Dredge

Methods

hLookupByLabelPath1 :: Proxy needJust -> Label (Label l ': ls) -> Record r -> v Source #

(HasField l (Variant r) (Maybe u), HasFieldPath 'True ls u (Maybe v)) => HasFieldPath needJust (Label l ': ls) (Variant r) (Maybe v) Source # 
Instance details

Defined in Data.HList.Dredge

Methods

hLookupByLabelPath1 :: Proxy needJust -> Label (Label l ': ls) -> Variant r -> Maybe v Source #

Label t ~ Label t' => SameLabels (Label t :: Type) (t' :: Symbol) Source # 
Instance details

Defined in Data.HList.FakePrelude

HEqBy HLeFn x y b => HEqBy HLeFn (Label x :: Type) (Label y :: Type) b Source # 
Instance details

Defined in Data.HList.HSort

Label t ~ Label t' => SameLabels (Label t :: Type) (Label t' :: Type) Source # 
Instance details

Defined in Data.HList.FakePrelude

Label t ~ Label t' => SameLabels (Label t :: Type) (Tagged t' a :: Type) Source # 
Instance details

Defined in Data.HList.FakePrelude

Label t ~ Label (Lbl ix ns n) => SameLabels (Label t :: Type) (Lbl ix ns n :: Type) Source # 
Instance details

Defined in Data.HList.Label3

(lv ~ Tagged l v, HUnzip (Proxy :: [Type] -> Type) ls vs lvs) => HUnzip (Proxy :: [Type] -> Type) (Label l ': ls) (v ': vs) (lv ': lvs) Source # 
Instance details

Defined in Data.HList.HListPrelude

Methods

hUnzip :: Proxy (lv ': lvs) -> (Proxy (Label l ': ls), Proxy (v ': vs)) Source #

Show desc => Show (Label (Lbl x ns desc)) Source # 
Instance details

Defined in Data.HList.Label3

Methods

showsPrec :: Int -> Label (Lbl x ns desc) -> ShowS #

show :: Label (Lbl x ns desc) -> String #

showList :: [Label (Lbl x ns desc)] -> ShowS #

IsKeyFN (Label s -> a -> b) 'True Source #

labels that impose no restriction on the type of the (single) argument which follows

>>> let testF (_ :: Label "a") (a :: Int) () = a+1
>>> kw (hBuild testF) (Label :: Label "a") 5 ()
6
Instance details

Defined in Data.HList.Keyword

HExtend (Label (Lbl n ns desc)) (Proxy (x ': xs)) Source #

Mixing two label kinds means we have to include Label:

>>> let r = label3 .*. label6 .*. emptyProxy
>>> :t r
r :: Proxy '[Label (Lbl 'HZero () ()), Label "6"]
Instance details

Defined in Data.HList.Label3

Associated Types

type HExtendR (Label (Lbl n ns desc)) (Proxy (x ': xs)) Source #

Methods

(.*.) :: Label (Lbl n ns desc) -> Proxy (x ': xs) -> HExtendR (Label (Lbl n ns desc)) (Proxy (x ': xs)) Source #

HExtend (Label (Lbl n ns desc)) (Proxy (Lbl n' ns' desc' ': xs)) Source #

If possible, Label is left off:

>>> let q = label3 .*. label3 .*. emptyProxy
>>> :t q
q :: Proxy '[Lbl 'HZero () (), Lbl 'HZero () ()]
Instance details

Defined in Data.HList.Label3

Associated Types

type HExtendR (Label (Lbl n ns desc)) (Proxy (Lbl n' ns' desc' ': xs)) Source #

Methods

(.*.) :: Label (Lbl n ns desc) -> Proxy (Lbl n' ns' desc' ': xs) -> HExtendR (Label (Lbl n ns desc)) (Proxy (Lbl n' ns' desc' ': xs)) Source #

HExtend (Label y) (Proxy (x ': xs)) Source # 
Instance details

Defined in Data.HList.Label3

Associated Types

type HExtendR (Label y) (Proxy (x ': xs)) Source #

Methods

(.*.) :: Label y -> Proxy (x ': xs) -> HExtendR (Label y) (Proxy (x ': xs)) Source #

HExtend (Label y) (Proxy (x ': xs)) Source # 
Instance details

Defined in Data.HList.Label3

Associated Types

type HExtendR (Label y) (Proxy (x ': xs)) Source #

Methods

(.*.) :: Label y -> Proxy (x ': xs) -> HExtendR (Label y) (Proxy (x ': xs)) Source #

HExtend (Label y) (Proxy (x ': xs)) Source # 
Instance details

Defined in Data.HList.Label6

Associated Types

type HExtendR (Label y) (Proxy (x ': xs)) Source #

Methods

(.*.) :: Label y -> Proxy (x ': xs) -> HExtendR (Label y) (Proxy (x ': xs)) Source #

HExtend (Label y) (Proxy (x ': xs)) Source # 
Instance details

Defined in Data.HList.Label3

Associated Types

type HExtendR (Label y) (Proxy (x ': xs)) Source #

Methods

(.*.) :: Label y -> Proxy (x ': xs) -> HExtendR (Label y) (Proxy (x ': xs)) Source #

HExtend (Label y) (Proxy (x ': xs)) Source #

Mixing two label kinds means we have to include Label:

>>> let s = label6 .*. label3 .*. emptyProxy
>>> :t s
s :: Proxy '[Label "6", Label (Lbl 'HZero () ())]
Instance details

Defined in Data.HList.Label3

Associated Types

type HExtendR (Label y) (Proxy (x ': xs)) Source #

Methods

(.*.) :: Label y -> Proxy (x ': xs) -> HExtendR (Label y) (Proxy (x ': xs)) Source #

HExtend (Label y) (Proxy (x ': xs)) Source #
>>> let labelX = Label :: Label "x"
>>> let labelY = Label :: Label "y"
>>> let p = labelX .*. labelY .*. emptyProxy
>>> :t p
p :: Proxy '["x", "y"]
Instance details

Defined in Data.HList.Label6

Associated Types

type HExtendR (Label y) (Proxy (x ': xs)) Source #

Methods

(.*.) :: Label y -> Proxy (x ': xs) -> HExtendR (Label y) (Proxy (x ': xs)) Source #

HExtend (Label x) (Proxy ('[] :: [Type])) Source #

to keep types shorter, .*. used with Proxy avoids producing a Proxy :: Proxy '[Label x,Label y,Label z] if Proxy :: Proxy '[x,y,z] is not a kind error (as it is when mixing Label6 and Label3 labels).

ghc-7.6 does not accept Proxy ('[] :: [k]) so for now require k ~ *

Instance details

Defined in Data.HList.HListPrelude

Associated Types

type HExtendR (Label x) (Proxy '[]) Source #

Methods

(.*.) :: Label x -> Proxy '[] -> HExtendR (Label x) (Proxy '[]) Source #

ToSym (a b c) x => EnsureLabel (a b c) (Label x) Source #

get the Label out of a LabeledTo (ie. `foobar when using HListPP).

Instance details

Defined in Data.HList.Labelable

Methods

toLabel :: a b c -> Label x Source #

EnsureLabel (Proxy x) (Label x) Source # 
Instance details

Defined in Data.HList.Labelable

Methods

toLabel :: Proxy x -> Label x Source #

EnsureLabel (Label x) (Label x) Source # 
Instance details

Defined in Data.HList.Labelable

Methods

toLabel :: Label x -> Label x Source #

(Labelable x r s t a b, j ~ p a (f b), k2 ~ p (r s) (f (r t)), ty ~ LabelableTy r, LabeledOpticP ty p, LabeledOpticF ty f, LabeledOpticTo ty x ((->) :: Type -> Type -> Type), LabelablePath xs i j) => LabelablePath (Label x ': xs) i k2 Source # 
Instance details

Defined in Data.HList.Dredge

Methods

hLens'Path :: Label (Label x ': xs) -> i -> k2 Source #

type UnLabel (proxy :: a) (Label x ': xs) Source # 
Instance details

Defined in Data.HList.Record

type UnLabel (proxy :: a) (Label x ': xs) = x ': UnLabel proxy xs
type ZipTagged (Label t ': ts :: [Type]) (v ': vs) Source # 
Instance details

Defined in Data.HList.FakePrelude

type ZipTagged (Label t ': ts :: [Type]) (v ': vs) = Tagged t v ': ZipTagged ts vs
type HExtendR (Label (Lbl n ns desc)) (Proxy (Lbl n' ns' desc' ': xs)) Source # 
Instance details

Defined in Data.HList.Label3

type HExtendR (Label (Lbl n ns desc)) (Proxy (Lbl n' ns' desc' ': xs)) = Proxy (Lbl n ns desc ': (Lbl n' ns' desc' ': xs))
type HExtendR (Label (Lbl n ns desc)) (Proxy (x ': xs)) Source # 
Instance details

Defined in Data.HList.Label3

type HExtendR (Label (Lbl n ns desc)) (Proxy (x ': xs)) = Proxy (Label (Lbl n ns desc) ': MapLabel (x ': xs))
type HExtendR (Label y) (Proxy (x ': xs)) Source # 
Instance details

Defined in Data.HList.Label3

type HExtendR (Label y) (Proxy (x ': xs)) = Proxy (Label y ': MapLabel (x ': xs))
type HExtendR (Label y) (Proxy (x ': xs)) Source # 
Instance details

Defined in Data.HList.Label3

type HExtendR (Label y) (Proxy (x ': xs)) = Proxy (Label y ': MapLabel (x ': xs))
type HExtendR (Label y) (Proxy (x ': xs)) Source # 
Instance details

Defined in Data.HList.Label6

type HExtendR (Label y) (Proxy (x ': xs)) = Proxy (y ': (x ': xs))
type HExtendR (Label y) (Proxy (x ': xs)) Source # 
Instance details

Defined in Data.HList.Label3

type HExtendR (Label y) (Proxy (x ': xs)) = Proxy (Label y ': MapLabel (x ': xs))
type HExtendR (Label y) (Proxy (x ': xs)) Source # 
Instance details

Defined in Data.HList.Label3

type HExtendR (Label y) (Proxy (x ': xs)) = Proxy (Label y ': MapLabel (x ': xs))
type HExtendR (Label y) (Proxy (x ': xs)) Source # 
Instance details

Defined in Data.HList.Label6

type HExtendR (Label y) (Proxy (x ': xs)) = Proxy (y ': (x ': xs))
type HExtendR (Label x) (Proxy ('[] :: [Type])) Source # 
Instance details

Defined in Data.HList.HListPrelude

type HExtendR (Label x) (Proxy ('[] :: [Type])) = Proxy '[x]
type LabelsOf (Label l ': r) Source # 
Instance details

Defined in Data.HList.Record

type LabelsOf (Label l ': r) = Label l ': LabelsOf r

data HUntag Source #

Constructors

HUntag 

Instances

Instances details
Tagged t x ~ tx => ApplyAB HUntag tx x Source # 
Instance details

Defined in Data.HList.FakePrelude

Methods

applyAB :: HUntag -> tx -> x Source #

newtype LiftA2 f Source #

Constructors

LiftA2 f 

Instances

Instances details
(ApplyAB f (x, y) z, mz ~ m z, mxy ~ (m x, m y), Applicative m) => ApplyAB (LiftA2 f) mxy mz Source # 
Instance details

Defined in Data.HList.FakePrelude

Methods

applyAB :: LiftA2 f -> mxy -> mz Source #

newtype HFmap f Source #

Constructors

HFmap f 

Instances

Instances details
(x ~ t a, y ~ t b, Functor t, ApplyAB f a b) => ApplyAB (HFmap f) x y Source # 
Instance details

Defined in Data.HList.FakePrelude

Methods

applyAB :: HFmap f -> x -> y Source #

data HFlip Source #

Constructors

HFlip 

Instances

Instances details
(f1 ~ (a -> b -> c), f2 ~ (b -> a -> c)) => ApplyAB HFlip f1 f2 Source # 
Instance details

Defined in Data.HList.FakePrelude

Methods

applyAB :: HFlip -> f1 -> f2 Source #

newtype HSeq x Source #

((a,b) -> f a >> b)

Constructors

HSeq x 

Instances

Instances details
(Monad m, ApplyAB f x fx, fx ~ m (), pair ~ (x, m ()), ApplyAB f x (m ())) => ApplyAB (HSeq f) pair fx Source # 
Instance details

Defined in Data.HList.FakePrelude

Methods

applyAB :: HSeq f -> pair -> fx Source #

data Comp Source #

app Comp (f,g) = g . f. Works like:

>>> applyAB Comp (succ, pred) 'a'
'a'
>>> applyAB Comp (toEnum :: Int -> Char, fromEnum) 10
10

Note that defaulting will sometimes give you the wrong thing

used to work (with associated types calculating result/argument types)
>>> applyAB Comp (fromEnum, toEnum) 'a'
*** Exception: Prelude.Enum.().toEnum: bad argument

Constructors

Comp 

Instances

Instances details
(y ~ y', fg ~ (x -> y, y' -> z), r ~ (x -> z)) => ApplyAB Comp fg r Source # 
Instance details

Defined in Data.HList.FakePrelude

Methods

applyAB :: Comp -> fg -> r Source #

data HComp g f Source #

Compose two instances of ApplyAB

>>> applyAB (HComp HRead HShow) (5::Double) :: Double
5.0

Constructors

HComp g f
g . f

Instances

Instances details
(ApplyAB f a b, ApplyAB g b c) => ApplyAB (HComp g f) a c Source # 
Instance details

Defined in Data.HList.FakePrelude

Methods

applyAB :: HComp g f -> a -> c Source #

data HShow Source #

show

Constructors

HShow 

Instances

Instances details
(String ~ string, Show a) => ApplyAB HShow a string Source # 
Instance details

Defined in Data.HList.FakePrelude

Methods

applyAB :: HShow -> a -> string Source #

data HRead Source #

read

>>> applyAB HRead "5.0" :: Double
5.0

Constructors

HRead 

Instances

Instances details
(String ~ string, Read a) => ApplyAB HRead string a Source # 
Instance details

Defined in Data.HList.FakePrelude

Methods

applyAB :: HRead -> string -> a Source #

data HPrint Source #

print. An alternative implementation could be:

>>> let hPrint = Fun print :: Fun Show (IO ())

This produces:

>>> :t applyAB hPrint
applyAB hPrint :: Show a => a -> IO ()

Constructors

HPrint 

Instances

Instances details
(io ~ IO (), Show x) => ApplyAB HPrint x io Source # 
Instance details

Defined in Data.HList.FakePrelude

Methods

applyAB :: HPrint -> x -> io Source #

type family FunCxt (cxts :: k) a :: Constraint Source #

Instances

Instances details
type FunCxt (cxt :: ()) a Source #

should there be so many ways to write no constraint?

Instance details

Defined in Data.HList.FakePrelude

type FunCxt (cxt :: ()) a = ()
type FunCxt (cxt :: Type) a Source # 
Instance details

Defined in Data.HList.FakePrelude

type FunCxt (cxt :: Type) a = cxt ~ a
type FunCxt ('[] :: [k]) a Source # 
Instance details

Defined in Data.HList.FakePrelude

type FunCxt ('[] :: [k]) a = ()
type FunCxt (x ': xs :: [Type -> Constraint]) a Source # 
Instance details

Defined in Data.HList.FakePrelude

type FunCxt (x ': xs :: [Type -> Constraint]) a = (x a, FunCxt xs a)
type FunCxt (cxt :: Type -> Constraint) a Source # 
Instance details

Defined in Data.HList.FakePrelude

type FunCxt (cxt :: Type -> Constraint) a = cxt a

type family FunApp (fns :: k) a Source #

Instances

Instances details
type FunApp (fn :: ()) a Source # 
Instance details

Defined in Data.HList.FakePrelude

type FunApp (fn :: ()) a = a
type FunApp (fn :: Type) a Source # 
Instance details

Defined in Data.HList.FakePrelude

type FunApp (fn :: Type) a = fn
type FunApp (fn :: Type -> Type) a Source # 
Instance details

Defined in Data.HList.FakePrelude

type FunApp (fn :: Type -> Type) a = fn a

data Fun' (cxt :: k1) (geta :: k2) Source #

see Fun. The only difference here is that the argument type is calculated from the result type.

>>> let rd = Fun' read :: Fun' Read String
>>> :t applyAB rd
applyAB rd :: Read b => [Char] -> b
>>> let fromJust' = Fun' (\(Just a) -> a) :: Fun' '[] Maybe
>>> :t applyAB fromJust'
applyAB fromJust' :: Maybe b -> b

Note this use of Fun' means we don't have to get the b out of Maybe b,

Constructors

Fun' (forall b. FunCxt cxt b => FunApp geta b -> b) 

Instances

Instances details
(FunCxt cxt b, FunApp geta b ~ a) => ApplyAB (Fun' cxt geta) a b Source # 
Instance details

Defined in Data.HList.FakePrelude

Methods

applyAB :: Fun' cxt geta -> a -> b Source #

data Fun (cxt :: k1) (getb :: k2) Source #

Constructors

Fun (forall a. FunCxt cxt a => a -> FunApp getb a) 

Instances

Instances details
(FunCxt cxt a, FunApp getb a ~ b) => ApplyAB (Fun cxt getb) a b Source # 
Instance details

Defined in Data.HList.FakePrelude

Methods

applyAB :: Fun cxt getb -> a -> b Source #

class ApplyAB f a b where Source #

No constraints on result and argument types

Methods

applyAB :: f -> a -> b Source #

Instances

Instances details
Tagged t x ~ tx => ApplyAB HUntag tx x Source # 
Instance details

Defined in Data.HList.FakePrelude

Methods

applyAB :: HUntag -> tx -> x Source #

(f1 ~ (a -> b -> c), f2 ~ (b -> a -> c)) => ApplyAB HFlip f1 f2 Source # 
Instance details

Defined in Data.HList.FakePrelude

Methods

applyAB :: HFlip -> f1 -> f2 Source #

(y ~ y', fg ~ (x -> y, y' -> z), r ~ (x -> z)) => ApplyAB Comp fg r Source # 
Instance details

Defined in Data.HList.FakePrelude

Methods

applyAB :: Comp -> fg -> r Source #

(String ~ string, Show a) => ApplyAB HShow a string Source # 
Instance details

Defined in Data.HList.FakePrelude

Methods

applyAB :: HShow -> a -> string Source #

(String ~ string, Read a) => ApplyAB HRead string a Source # 
Instance details

Defined in Data.HList.FakePrelude

Methods

applyAB :: HRead -> string -> a Source #

(io ~ IO (), Show x) => ApplyAB HPrint x io Source # 
Instance details

Defined in Data.HList.FakePrelude

Methods

applyAB :: HPrint -> x -> io Source #

(aa ~ (a, a), Semigroup a) => ApplyAB UncurrySappend aa a Source # 
Instance details

Defined in Data.HList.HList

Methods

applyAB :: UncurrySappend -> aa -> a Source #

(aa ~ (a, a), Monoid a) => ApplyAB UncurryMappend aa a Source # 
Instance details

Defined in Data.HList.HList

Methods

applyAB :: UncurryMappend -> aa -> a Source #

(x ~ Proxy y, Monoid y) => ApplyAB ConstMempty x y Source # 
Instance details

Defined in Data.HList.HList

Methods

applyAB :: ConstMempty -> x -> y Source #

hJustA ~ HJust a => ApplyAB HFromJust hJustA a Source # 
Instance details

Defined in Data.HList.HList

Methods

applyAB :: HFromJust -> hJustA -> a Source #

(x ~ (e, HList l), y ~ HList (e ': l)) => ApplyAB FHCons x y Source # 
Instance details

Defined in Data.HList.HList

Methods

applyAB :: FHCons -> x -> y Source #

tx ~ Tagged t x => ApplyAB TaggedFn x tx Source # 
Instance details

Defined in Data.HList.Record

Methods

applyAB :: TaggedFn -> x -> tx Source #

(x ~ Tagged l v, y ~ HList '[Label l, v]) => ApplyAB TaggedToKW x y Source # 
Instance details

Defined in Data.HList.Keyword

Methods

applyAB :: TaggedToKW -> x -> y Source #

(HZip3 a b c, x ~ (HList a, HList b), y ~ HList c) => ApplyAB HZipF x y Source # 
Instance details

Defined in Data.HList.HZip

Methods

applyAB :: HZipF -> x -> y Source #

(x ~ (Tagged t (Maybe e), [Variant v]), y ~ [Variant (Tagged t e ': v)], MkVariant t e (Tagged t e ': v)) => ApplyAB HMaybiedToVariantFs x y Source # 
Instance details

Defined in Data.HList.Variant

Methods

applyAB :: HMaybiedToVariantFs -> x -> y Source #

y ~ Tagged t (Maybe e) => ApplyAB ConstTaggedNothing x y Source # 
Instance details

Defined in Data.HList.Variant

Methods

applyAB :: ConstTaggedNothing -> x -> y Source #

(mx ~ Maybe x, my ~ Maybe y, HCast y x) => ApplyAB HCastF mx my Source # 
Instance details

Defined in Data.HList.Variant

Methods

applyAB :: HCastF -> mx -> my Source #

(ee ~ (e, e), Eq e, bool ~ Bool) => ApplyAB UncurryEq ee bool Source # 
Instance details

Defined in Data.HList.Variant

Methods

applyAB :: UncurryEq -> ee -> bool Source #

(ux ~ RecordU x, hx ~ HList x, RecordUToRecord x) => ApplyAB BoxF ux hx Source # 
Instance details

Defined in Data.HList.RecordU

Methods

applyAB :: BoxF -> ux -> hx Source #

(hx ~ HList x, ux ~ RecordU x, RecordToRecordU x) => ApplyAB UnboxF hx ux Source # 
Instance details

Defined in Data.HList.RecordU

Methods

applyAB :: UnboxF -> hx -> ux Source #

e' ~ e => ApplyAB HRmTag (e, t) e' Source # 
Instance details

Defined in Data.HList.HList

Methods

applyAB :: HRmTag -> (e, t) -> e' Source #

(y ~ ReadP x, Read x) => ApplyAB ReadElement (Proxy x) y Source # 
Instance details

Defined in Data.HList.HList

Methods

applyAB :: ReadElement -> Proxy x -> y Source #

(Read v, ShowLabel l, x ~ Tagged l v, ReadP x ~ y) => ApplyAB ReadComponent (Proxy x) y Source # 
Instance details

Defined in Data.HList.Record

Methods

applyAB :: ReadComponent -> Proxy x -> y Source #

hJustA ~ HJust a => ApplyAB (HJust t) a hJustA Source #

HJust () is a placeholder for a function that applies the HJust constructor

Instance details

Defined in Data.HList.FakePrelude

Methods

applyAB :: HJust t -> a -> hJustA Source #

(ApplyAB f (x, y) z, mz ~ m z, mxy ~ (m x, m y), Applicative m) => ApplyAB (LiftA2 f) mxy mz Source # 
Instance details

Defined in Data.HList.FakePrelude

Methods

applyAB :: LiftA2 f -> mxy -> mz Source #

(x ~ t a, y ~ t b, Functor t, ApplyAB f a b) => ApplyAB (HFmap f) x y Source # 
Instance details

Defined in Data.HList.FakePrelude

Methods

applyAB :: HFmap f -> x -> y Source #

(Monad m, ApplyAB f x fx, fx ~ m (), pair ~ (x, m ()), ApplyAB f x (m ())) => ApplyAB (HSeq f) pair fx Source # 
Instance details

Defined in Data.HList.FakePrelude

Methods

applyAB :: HSeq f -> pair -> fx Source #

(hxs ~ HList xs, hxxs ~ HList (x ': xs)) => ApplyAB (FHCons2 x) hxs hxxs Source # 
Instance details

Defined in Data.HList.HList

Methods

applyAB :: FHCons2 x -> hxs -> hxxs Source #

et ~ (e, t) => ApplyAB (HAddTag t) e et Source # 
Instance details

Defined in Data.HList.HList

Methods

applyAB :: HAddTag t -> e -> et Source #

(l ~ [e'], ApplyAB f e e', el ~ (e, l)) => ApplyAB (Mapcar f) el l Source # 
Instance details

Defined in Data.HList.HList

Methods

applyAB :: Mapcar f -> el -> l Source #

(HMapCxt HList f a b, as ~ HList a, bs ~ HList b) => ApplyAB (HMapL f) as bs Source # 
Instance details

Defined in Data.HList.HList

Methods

applyAB :: HMapL f -> as -> bs Source #

(HMapCxt r f a b, as ~ r a, bs ~ r b) => ApplyAB (HMap f) as bs Source # 
Instance details

Defined in Data.HList.HList

Methods

applyAB :: HMap f -> as -> bs Source #

(HMapCxt Record f x y, rx ~ Record x, ry ~ Record y) => ApplyAB (HMapR f) rx ry Source # 
Instance details

Defined in Data.HList.Record

Methods

applyAB :: HMapR f -> rx -> ry Source #

(vx ~ Variant x, vy ~ Variant y, HMapAux Variant (HFmap f) x y, SameLength x y) => ApplyAB (HMapV f) vx vy Source #

apply a function to all values that could be in the variant.

Instance details

Defined in Data.HList.Variant

Methods

applyAB :: HMapV f -> vx -> vy Source #

(Data b, x ~ (t, c (b -> r)), y ~ c r) => ApplyAB (GunfoldK c) x y Source # 
Instance details

Defined in Data.HList.Data

Methods

applyAB :: GunfoldK c -> x -> y Source #

(Data d, (c (d -> b), d) ~ x, c b ~ y) => ApplyAB (GfoldlK c) x y Source # 
Instance details

Defined in Data.HList.Data

Methods

applyAB :: GfoldlK c -> x -> y Source #

ApplyAB f e e' => ApplyAB (MapCar f) (e, HList l) (HList (e' ': l)) Source # 
Instance details

Defined in Data.HList.HList

Methods

applyAB :: MapCar f -> (e, HList l) -> HList (e' ': l) Source #

(x' ~ x, y' ~ y) => ApplyAB (x' -> y') x y Source #

note this function will only be available at a single type (that is, hMap succ will only work on HList that contain only one type)

Instance details

Defined in Data.HList.FakePrelude

Methods

applyAB :: (x' -> y') -> x -> y Source #

(ApplyAB f a b, ApplyAB g b c) => ApplyAB (HComp g f) a c Source # 
Instance details

Defined in Data.HList.FakePrelude

Methods

applyAB :: HComp g f -> a -> c Source #

(FunCxt cxt b, FunApp geta b ~ a) => ApplyAB (Fun' cxt geta) a b Source # 
Instance details

Defined in Data.HList.FakePrelude

Methods

applyAB :: Fun' cxt geta -> a -> b Source #

(FunCxt cxt a, FunApp getb a ~ b) => ApplyAB (Fun cxt getb) a b Source # 
Instance details

Defined in Data.HList.FakePrelude

Methods

applyAB :: Fun cxt getb -> a -> b Source #

class Apply f a where Source #

simpler/weaker version where type information only propagates forward with this one. applyAB defined below, is more complicated / verbose to define, but it offers better type inference. Most uses have been converted to applyAB, so there is not much that can be done with Apply.

Associated Types

type ApplyR f a :: * Source #

Methods

apply :: f -> a -> ApplyR f a Source #

Instances

Instances details
HLookupByHNat n l => Apply (FHLookupByHNat l) (Proxy n) Source # 
Instance details

Defined in Data.HList.HArray

Associated Types

type ApplyR (FHLookupByHNat l) (Proxy n) Source #

Apply (FHUProj sel ns) (HList l, Proxy ('HSucc n)) => Apply (Proxy 'False, FHUProj sel ns) (HList (e ': l), Proxy n) Source # 
Instance details

Defined in Data.HList.HArray

Associated Types

type ApplyR (Proxy 'False, FHUProj sel ns) (HList (e ': l), Proxy n) Source #

Methods

apply :: (Proxy 'False, FHUProj sel ns) -> (HList (e ': l), Proxy n) -> ApplyR (Proxy 'False, FHUProj sel ns) (HList (e ': l), Proxy n) Source #

Apply (Proxy 'True, FHUProj sel ns) (HList (e ': l), Proxy n) Source # 
Instance details

Defined in Data.HList.HArray

Associated Types

type ApplyR (Proxy 'True, FHUProj sel ns) (HList (e ': l), Proxy n) Source #

Methods

apply :: (Proxy 'True, FHUProj sel ns) -> (HList (e ': l), Proxy n) -> ApplyR (Proxy 'True, FHUProj sel ns) (HList (e ': l), Proxy n) Source #

(ch ~ Proxy (HBoolEQ sel (KMember n ns)), Apply (ch, FHUProj sel ns) (HList (e ': l), Proxy n)) => Apply (FHUProj sel ns) (HList (e ': l), Proxy n) Source # 
Instance details

Defined in Data.HList.HArray

Associated Types

type ApplyR (FHUProj sel ns) (HList (e ': l), Proxy n) Source #

Methods

apply :: FHUProj sel ns -> (HList (e ': l), Proxy n) -> ApplyR (FHUProj sel ns) (HList (e ': l), Proxy n) Source #

Apply (FHUProj sel ns) (HList ('[] :: [Type]), n) Source # 
Instance details

Defined in Data.HList.HArray

Associated Types

type ApplyR (FHUProj sel ns) (HList '[], n) Source #

Methods

apply :: FHUProj sel ns -> (HList '[], n) -> ApplyR (FHUProj sel ns) (HList '[], n) Source #

hAnd :: Proxy t1 -> Proxy t2 -> Proxy (HAnd t1 t2) Source #

demote to values

hOr :: Proxy t1 -> Proxy t2 -> Proxy (HOr t1 t2) Source #

demote to values

hNot :: HNotFD a notA => Proxy a -> Proxy notA Source #

hSucc :: Proxy (n :: HNat) -> Proxy (HSucc n) Source #

hLt :: Proxy x -> Proxy y -> Proxy (HLt x y) Source #

hLe :: Proxy x -> Proxy y -> Proxy (HLe x y) Source #

hEq :: HEq x y b => x -> y -> Proxy b Source #

asLengthOf :: SameLength x y => r x -> s y -> r x Source #

sameLabels :: SameLabels x y => p (r x) (f (q y)) -> p (r x) (f (q y)) Source #

sameLabels constrains the type of an optic, such that the labels (t in Tagged t a) are the same. x or y may have more elements than the other, in which case the elements at the end of the longer list do not have their labels constrained.

see also sameLength

re-exports

module Data.Proxy

class Semigroup a => Monoid a where #

The class of monoids (types with an associative binary operation that has an identity). Instances should satisfy the following:

Right identity
x <> mempty = x
Left identity
mempty <> x = x
Associativity
x <> (y <> z) = (x <> y) <> z (Semigroup law)
Concatenation
mconcat = foldr (<>) mempty

The method names refer to the monoid of lists under concatenation, but there are many other instances.

Some types can be viewed as a monoid in more than one way, e.g. both addition and multiplication on numbers. In such cases we often define newtypes and make those instances of Monoid, e.g. Sum and Product.

NOTE: Semigroup is a superclass of Monoid since base-4.11.0.0.

Minimal complete definition

mempty

Methods

mempty :: a #

Identity of mappend

>>> "Hello world" <> mempty
"Hello world"

mappend :: a -> a -> a #

An associative operation

NOTE: This method is redundant and has the default implementation mappend = (<>) since base-4.11.0.0. Should it be implemented manually, since mappend is a synonym for (<>), it is expected that the two functions are defined the same way. In a future GHC release mappend will be removed from Monoid.

mconcat :: [a] -> a #

Fold a list using the monoid.

For most types, the default definition for mconcat will be used, but the function is included in the class definition so that an optimized version can be provided for specific types.

>>> mconcat ["Hello", " ", "Haskell", "!"]
"Hello Haskell!"

Instances

Instances details
Monoid Ordering

Since: base-2.1

Instance details

Defined in GHC.Base

Monoid ()

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

mempty :: () #

mappend :: () -> () -> () #

mconcat :: [()] -> () #

Monoid All

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

mempty :: All #

mappend :: All -> All -> All #

mconcat :: [All] -> All #

Monoid Any

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

mempty :: Any #

mappend :: Any -> Any -> Any #

mconcat :: [Any] -> Any #

Monoid Doc 
Instance details

Defined in Text.PrettyPrint.HughesPJ

Methods

mempty :: Doc #

mappend :: Doc -> Doc -> Doc #

mconcat :: [Doc] -> Doc #

Monoid [a]

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

mempty :: [a] #

mappend :: [a] -> [a] -> [a] #

mconcat :: [[a]] -> [a] #

Semigroup a => Monoid (Maybe a)

Lift a semigroup into Maybe forming a Monoid according to http://en.wikipedia.org/wiki/Monoid: "Any semigroup S may be turned into a monoid simply by adjoining an element e not in S and defining e*e = e and e*s = s = s*e for all s ∈ S."

Since 4.11.0: constraint on inner a value generalised from Monoid to Semigroup.

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

mempty :: Maybe a #

mappend :: Maybe a -> Maybe a -> Maybe a #

mconcat :: [Maybe a] -> Maybe a #

Monoid a => Monoid (IO a)

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

mempty :: IO a #

mappend :: IO a -> IO a -> IO a #

mconcat :: [IO a] -> IO a #

Monoid p => Monoid (Par1 p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Methods

mempty :: Par1 p #

mappend :: Par1 p -> Par1 p -> Par1 p #

mconcat :: [Par1 p] -> Par1 p #

Monoid (Predicate a) 
Instance details

Defined in Data.Functor.Contravariant

Monoid (Comparison a) 
Instance details

Defined in Data.Functor.Contravariant

Monoid (Equivalence a) 
Instance details

Defined in Data.Functor.Contravariant

(Ord a, Bounded a) => Monoid (Min a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

mempty :: Min a #

mappend :: Min a -> Min a -> Min a #

mconcat :: [Min a] -> Min a #

(Ord a, Bounded a) => Monoid (Max a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

mempty :: Max a #

mappend :: Max a -> Max a -> Max a #

mconcat :: [Max a] -> Max a #

Monoid m => Monoid (WrappedMonoid m)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Semigroup a => Monoid (Option a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

mempty :: Option a #

mappend :: Option a -> Option a -> Option a #

mconcat :: [Option a] -> Option a #

Monoid a => Monoid (Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Methods

mempty :: Identity a #

mappend :: Identity a -> Identity a -> Identity a #

mconcat :: [Identity a] -> Identity a #

Monoid (First a)

Since: base-2.1

Instance details

Defined in Data.Monoid

Methods

mempty :: First a #

mappend :: First a -> First a -> First a #

mconcat :: [First a] -> First a #

Monoid (Last a)

Since: base-2.1

Instance details

Defined in Data.Monoid

Methods

mempty :: Last a #

mappend :: Last a -> Last a -> Last a #

mconcat :: [Last a] -> Last a #

Monoid a => Monoid (Dual a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

mempty :: Dual a #

mappend :: Dual a -> Dual a -> Dual a #

mconcat :: [Dual a] -> Dual a #

Monoid (Endo a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

mempty :: Endo a #

mappend :: Endo a -> Endo a -> Endo a #

mconcat :: [Endo a] -> Endo a #

Num a => Monoid (Sum a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

mempty :: Sum a #

mappend :: Sum a -> Sum a -> Sum a #

mconcat :: [Sum a] -> Sum a #

Num a => Monoid (Product a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

mempty :: Product a #

mappend :: Product a -> Product a -> Product a #

mconcat :: [Product a] -> Product a #

Monoid a => Monoid (Down a)

Since: base-4.11.0.0

Instance details

Defined in Data.Ord

Methods

mempty :: Down a #

mappend :: Down a -> Down a -> Down a #

mconcat :: [Down a] -> Down a #

Monoid (Seq a) 
Instance details

Defined in Data.Sequence.Internal

Methods

mempty :: Seq a #

mappend :: Seq a -> Seq a -> Seq a #

mconcat :: [Seq a] -> Seq a #

Monoid (Doc a) 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Methods

mempty :: Doc a #

mappend :: Doc a -> Doc a -> Doc a #

mconcat :: [Doc a] -> Doc a #

(HProxies a, HMapCxt HList ConstMempty (AddProxy a) a, HZip HList a a aa, HMapCxt HList UncurryMappend aa a) => Monoid (HList a) Source #

Analogous to the Monoid instance for tuples

>>> import Data.Monoid
>>> mempty :: HList '[(), All, [Int]]
H[(),All {getAll = True},[]]
>>> mappend (hBuild "a") (hBuild "b") :: HList '[String]
H["ab"]
Instance details

Defined in Data.HList.HList

Methods

mempty :: HList a #

mappend :: HList a -> HList a -> HList a #

mconcat :: [HList a] -> HList a #

Monoid (HList r) => Monoid (Record r) Source # 
Instance details

Defined in Data.HList.Record

Methods

mempty :: Record r #

mappend :: Record r -> Record r -> Record r #

mconcat :: [Record r] -> Record r #

(Monoid x, Monoid (Variant (a ': b))) => Monoid (Variant (Tagged t x ': (a ': b))) Source # 
Instance details

Defined in Data.HList.Variant

Methods

mempty :: Variant (Tagged t x ': (a ': b)) #

mappend :: Variant (Tagged t x ': (a ': b)) -> Variant (Tagged t x ': (a ': b)) -> Variant (Tagged t x ': (a ': b)) #

mconcat :: [Variant (Tagged t x ': (a ': b))] -> Variant (Tagged t x ': (a ': b)) #

(Unvariant '[Tagged t x] x, Monoid x) => Monoid (Variant '[Tagged t x]) Source # 
Instance details

Defined in Data.HList.Variant

Methods

mempty :: Variant '[Tagged t x] #

mappend :: Variant '[Tagged t x] -> Variant '[Tagged t x] -> Variant '[Tagged t x] #

mconcat :: [Variant '[Tagged t x]] -> Variant '[Tagged t x] #

Monoid (HList a) => Monoid (TIP a) Source # 
Instance details

Defined in Data.HList.TIP

Methods

mempty :: TIP a #

mappend :: TIP a -> TIP a -> TIP a #

mconcat :: [TIP a] -> TIP a #

Monoid (Variant l) => Monoid (TIC l) Source # 
Instance details

Defined in Data.HList.TIC

Methods

mempty :: TIC l #

mappend :: TIC l -> TIC l -> TIC l #

mconcat :: [TIC l] -> TIC l #

Monoid b => Monoid (a -> b)

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

mempty :: a -> b #

mappend :: (a -> b) -> (a -> b) -> a -> b #

mconcat :: [a -> b] -> a -> b #

Monoid (U1 p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Methods

mempty :: U1 p #

mappend :: U1 p -> U1 p -> U1 p #

mconcat :: [U1 p] -> U1 p #

(Monoid a, Monoid b) => Monoid (a, b)

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

mempty :: (a, b) #

mappend :: (a, b) -> (a, b) -> (a, b) #

mconcat :: [(a, b)] -> (a, b) #

Monoid a => Monoid (ST s a)

Since: base-4.11.0.0

Instance details

Defined in GHC.ST

Methods

mempty :: ST s a #

mappend :: ST s a -> ST s a -> ST s a #

mconcat :: [ST s a] -> ST s a #

Monoid a => Monoid (Op a b) 
Instance details

Defined in Data.Functor.Contravariant

Methods

mempty :: Op a b #

mappend :: Op a b -> Op a b -> Op a b #

mconcat :: [Op a b] -> Op a b #

Monoid (Proxy s)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Methods

mempty :: Proxy s #

mappend :: Proxy s -> Proxy s -> Proxy s #

mconcat :: [Proxy s] -> Proxy s #

Monoid (f p) => Monoid (Rec1 f p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Methods

mempty :: Rec1 f p #

mappend :: Rec1 f p -> Rec1 f p -> Rec1 f p #

mconcat :: [Rec1 f p] -> Rec1 f p #

(Monoid a, Monoid b, Monoid c) => Monoid (a, b, c)

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

mempty :: (a, b, c) #

mappend :: (a, b, c) -> (a, b, c) -> (a, b, c) #

mconcat :: [(a, b, c)] -> (a, b, c) #

Monoid a => Monoid (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Methods

mempty :: Const a b #

mappend :: Const a b -> Const a b -> Const a b #

mconcat :: [Const a b] -> Const a b #

(Applicative f, Monoid a) => Monoid (Ap f a)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

mempty :: Ap f a #

mappend :: Ap f a -> Ap f a -> Ap f a #

mconcat :: [Ap f a] -> Ap f a #

Alternative f => Monoid (Alt f a)

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

mempty :: Alt f a #

mappend :: Alt f a -> Alt f a -> Alt f a #

mconcat :: [Alt f a] -> Alt f a #

(Profunctor p, Arrow p, Semigroup b, Monoid b) => Monoid (Closure p a b) 
Instance details

Defined in Data.Profunctor.Closed

Methods

mempty :: Closure p a b #

mappend :: Closure p a b -> Closure p a b -> Closure p a b #

mconcat :: [Closure p a b] -> Closure p a b #

ArrowPlus p => Monoid (Tambara p a b) 
Instance details

Defined in Data.Profunctor.Strong

Methods

mempty :: Tambara p a b #

mappend :: Tambara p a b -> Tambara p a b -> Tambara p a b #

mconcat :: [Tambara p a b] -> Tambara p a b #

(Semigroup a, Monoid a) => Monoid (Tagged s a) 
Instance details

Defined in Data.Tagged

Methods

mempty :: Tagged s a #

mappend :: Tagged s a -> Tagged s a -> Tagged s a #

mconcat :: [Tagged s a] -> Tagged s a #

Monoid c => Monoid (K1 i c p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Methods

mempty :: K1 i c p #

mappend :: K1 i c p -> K1 i c p -> K1 i c p #

mconcat :: [K1 i c p] -> K1 i c p #

(Monoid (f p), Monoid (g p)) => Monoid ((f :*: g) p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Methods

mempty :: (f :*: g) p #

mappend :: (f :*: g) p -> (f :*: g) p -> (f :*: g) p #

mconcat :: [(f :*: g) p] -> (f :*: g) p #

(Monoid a, Monoid b, Monoid c, Monoid d) => Monoid (a, b, c, d)

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

mempty :: (a, b, c, d) #

mappend :: (a, b, c, d) -> (a, b, c, d) -> (a, b, c, d) #

mconcat :: [(a, b, c, d)] -> (a, b, c, d) #

Monoid r => Monoid (Forget r a b)

Via Monoid r => (a -> r)

Since: profunctors-5.6.2

Instance details

Defined in Data.Profunctor.Types

Methods

mempty :: Forget r a b #

mappend :: Forget r a b -> Forget r a b -> Forget r a b #

mconcat :: [Forget r a b] -> Forget r a b #

Monoid (f p) => Monoid (M1 i c f p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Methods

mempty :: M1 i c f p #

mappend :: M1 i c f p -> M1 i c f p -> M1 i c f p #

mconcat :: [M1 i c f p] -> M1 i c f p #

Monoid (f (g p)) => Monoid ((f :.: g) p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Methods

mempty :: (f :.: g) p #

mappend :: (f :.: g) p -> (f :.: g) p -> (f :.: g) p #

mconcat :: [(f :.: g) p] -> (f :.: g) p #

(Monoid a, Monoid b, Monoid c, Monoid d, Monoid e) => Monoid (a, b, c, d, e)

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

mempty :: (a, b, c, d, e) #

mappend :: (a, b, c, d, e) -> (a, b, c, d, e) -> (a, b, c, d, e) #

mconcat :: [(a, b, c, d, e)] -> (a, b, c, d, e) #

type family Any :: k where ... #

The type constructor Any is type to which you can unsafely coerce any lifted type, and back. More concretely, for a lifted type t and value x :: t, -- unsafeCoerce (unsafeCoerce x :: Any) :: t is equivalent to x.