Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Semigroups and monoids.
Pure type families
Nicer to use when applied explicitly.
type family (x :: a) <> (y :: a) :: a Source #
Type-level semigroup composition (
.<>
)
Instances
type 'EQ <> (b :: Ordering) Source # | |
Defined in Fcf.Class.Monoid | |
type 'GT <> (_b :: Ordering) Source # | |
Defined in Fcf.Class.Monoid | |
type 'LT <> (_b :: Ordering) Source # | |
Defined in Fcf.Class.Monoid | |
type (a :: Ordering) <> 'EQ Source # | |
Defined in Fcf.Class.Monoid | |
type (_a :: ()) <> (_b :: ()) Source # | |
Defined in Fcf.Class.Monoid type (_a :: ()) <> (_b :: ()) = '() | |
type (x :: Symbol) <> (y :: Symbol) Source # | With base >= 4.10.0.0. |
Defined in Fcf.Class.Monoid | |
type ('All a :: All) <> ('All b :: All) Source # | |
type ('Any a :: Any) <> ('Any b :: Any) Source # | |
type (a2 :: Maybe a1) <> ('Nothing :: Maybe a1) Source # | |
Defined in Fcf.Class.Monoid | |
type ('Nothing :: Maybe a) <> (b :: Maybe a) Source # | |
Defined in Fcf.Class.Monoid | |
type ('[] :: [k]) <> (ys :: [k]) Source # | |
Defined in Fcf.Class.Monoid type ('[] :: [k]) <> (ys :: [k]) = ys | |
type ('Endo f :: Endo a) <> ('Endo g :: Endo a) Source # | |
type ('Just a2 :: Maybe a1) <> ('Just b :: Maybe a1) Source # | |
type (x ': xs :: [a]) <> (ys :: [a]) Source # | |
Defined in Fcf.Class.Monoid | |
type ('(a1, a2) :: (k1, k2)) <> ('(b1, b2) :: (k1, k2)) Source # | |
Defined in Fcf.Class.Monoid | |
type ('(a1, a2, a3) :: (k1, k2, k3)) <> ('(b1, b2, b3) :: (k1, k2, k3)) Source # | |
Defined in Fcf.Class.Monoid |
type family MEmpty :: a Source #
Type-level monoid identity mempty
.
Examples
>>>
:kind! LT <> MEmpty
LT <> MEmpty :: Ordering = LT
>>>
:kind! MEmpty <> '(EQ, [1, 2])
MEmpty <> '(EQ, [1, 2]) :: (Ordering, [Natural]) = '(EQ, [1, 2])
>>>
:kind! '(GT, Just '()) <> MEmpty
'(GT, Just '()) <> MEmpty :: (Ordering, Maybe ()) = '(GT, Just '())
Instances
type MEmpty Source # | |
Defined in Fcf.Class.Monoid | |
type MEmpty Source # | |
Defined in Fcf.Class.Monoid | |
type MEmpty Source # | |
Defined in Fcf.Class.Monoid | |
type MEmpty Source # | |
Defined in Fcf.Class.Monoid type MEmpty = '() | |
type MEmpty Source # | |
Defined in Fcf.Class.Monoid type MEmpty = "" | |
type MEmpty Source # | |
Defined in Fcf.Class.Monoid.Types | |
type MEmpty Source # | |
Defined in Fcf.Class.Monoid | |
type MEmpty Source # | |
Defined in Fcf.Class.Monoid type MEmpty = '[] :: [k] | |
type MEmpty Source # | |
Defined in Fcf.Class.Monoid | |
type MEmpty Source # | |
Defined in Fcf.Class.Monoid |
First-class families
Can be composed and passed to higher-order functions.