Safe Haskell | Safe |
---|---|
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 LT <> (_b :: Ordering) Source # | |
Defined in Fcf.Class.Monoid | |
type EQ <> (b :: Ordering) Source # | |
Defined in Fcf.Class.Monoid | |
type GT <> (_b :: Ordering) Source # | |
Defined in Fcf.Class.Monoid | |
type (a :: Ordering) <> EQ Source # | |
Defined in Fcf.Class.Monoid | |
type (x :: Symbol) <> (y :: Symbol) Source # | With base >= 4.10.0.0. |
Defined in Fcf.Class.Monoid | |
type (_a :: ()) <> (_b :: ()) Source # | |
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 ([] :: [k]) <> (ys :: [k]) Source # | |
Defined in Fcf.Class.Monoid type ([] :: [k]) <> (ys :: [k]) = ys | |
type (Nothing :: Maybe a) <> (b :: Maybe a) Source # | |
Defined in Fcf.Class.Monoid | |
type (Just a2 :: Maybe a1) <> (Just b :: Maybe a1) Source # | |
type (Endo f :: Endo a) <> (Endo g :: Endo a) Source # | |
type (x ': xs :: [a]) <> (ys :: [a]) Source # | |
Defined in Fcf.Class.Monoid | |
type ((,) a1 a2 :: (k2, k1)) <> ((,) b1 b2 :: (k2, k1)) Source # | |
type ((,,) a1 a2 a3 :: (k2, k1, k3)) <> ((,,) b1 b2 b3 :: (k2, k1, k3)) Source # | |
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, [Nat]) = '( '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 = "" | |
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 = ([] :: [k]) | |
type MEmpty Source # | |
Defined in Fcf.Class.Monoid | |
type MEmpty Source # | |
Defined in Fcf.Class.Monoid.Types | |
type MEmpty Source # | |
Defined in Fcf.Class.Monoid | |
type MEmpty Source # | |
First-class families
Can be composed and passed to higher-order functions.