multistate-0.8.0.4: like mtl's ReaderT / WriterT / StateT, but more than one contained value/type.

Safe Haskell | Safe-Inferred
Language | Haskell2010

Data.HList.HList

Description

A GADT HList implementation

There exist other implementations of HList on hackage, but none seem to be reliably maintained.

# Documentation

data HList (a :: [Type]) where Source #

Constructors

HNil :: HList ('[] :: [Type]) |
(:+:) :: forall x (xs :: [Type]). x -> HList xs -> HList (x ': xs) infixr 5 |

#### Instances

Instances details

(Semigroup x, Monoid x, Semigroup (HList xs), Monoid (HList xs)) => Monoid (HList (x ': xs)) Source # |
Instance details Defined in Data.HList.HList Methods mempty :: HList (x ': xs) Source # mappend :: HList (x ': xs) -> HList (x ': xs) -> HList (x ': xs) Source # mconcat :: [HList (x ': xs)] -> HList (x ': xs) Source #
Monoid (HList ('[] :: [Type])) Source # |
Instance details Defined in Data.HList.HList Methods mempty :: HList ('[] :: [Type]) Source # mappend :: HList ('[] :: [Type]) -> HList ('[] :: [Type]) -> HList ('[] :: [Type]) Source # mconcat :: [HList ('[] :: [Type])] -> HList ('[] :: [Type]) Source #
(Semigroup x, Semigroup (HList xs)) => Semigroup (HList (x ': xs)) Source # |
Instance details Defined in Data.HList.HList Methods (<>) :: HList (x ': xs) -> HList (x ': xs) -> HList (x ': xs) Source # sconcat :: NonEmpty (HList (x ': xs)) -> HList (x ': xs) Source # stimes :: Integral b => b -> HList (x ': xs) -> HList (x ': xs) Source #
Semigroup (HList ('[] :: [Type])) Source # |
Instance details Defined in Data.HList.HList Methods (<>) :: HList ('[] :: [Type]) -> HList ('[] :: [Type]) -> HList ('[] :: [Type]) Source # sconcat :: NonEmpty (HList ('[] :: [Type])) -> HList ('[] :: [Type]) Source # stimes :: Integral b => b -> HList ('[] :: [Type]) -> HList ('[] :: [Type]) Source #
(Show a, Show (HList b)) => Show (HList (a ': b)) Source # |
Instance details Defined in Data.HList.HList Methods showsPrec :: Int -> HList (a ': b) -> ShowS Source # show :: HList (a ': b) -> String Source # showList :: [HList (a ': b)] -> ShowS Source #
Show (HList ('[] :: [Type])) Source # |
Instance details Defined in Data.HList.HList Methods showsPrec :: Int -> HList ('[] :: [Type]) -> ShowS Source # show :: HList ('[] :: [Type]) -> String Source # showList :: [HList ('[] :: [Type])] -> ShowS Source #
(Eq x, Eq (HList xs)) => Eq (HList (x ': xs)) Source # |
Instance details Defined in Data.HList.HList Methods (==) :: HList (x ': xs) -> HList (x ': xs) -> Bool Source # (/=) :: HList (x ': xs) -> HList (x ': xs) -> Bool Source #
Eq (HList ('[] :: [Type])) Source # |
Instance details Defined in Data.HList.HList Methods (==) :: HList ('[] :: [Type]) -> HList ('[] :: [Type]) -> Bool Source # (/=) :: HList ('[] :: [Type]) -> HList ('[] :: [Type]) -> Bool Source #

type family Append (l1 :: [Type]) (l2 :: [Type]) :: [Type] Source #

#### Instances

Instances details

type Append ('[] :: [Type]) l2 Source # |
Instance details Defined in Data.HList.HList type Append ('[] :: [Type]) l2 = l2
type Append (car1 ': cdr2) l2 Source # |
Instance details Defined in Data.HList.HList type Append (car1 ': cdr2) l2 = car1 ': Append cdr2 l2

hAppend :: forall (ts1 :: [Type]) (ts2 :: [Type]). HList ts1 -> HList ts2 -> HList (Append ts1 ts2) Source #

class HInit (l1 :: [Type]) where Source #

Methods

hInit :: forall (l2 :: [Type]). Proxy l2 -> HList (Append l1 l2) -> HList l1 Source #

hSplit :: forall (l2 :: [Type]). HList (Append l1 l2) -> (HList l1, HList l2) Source #

#### Instances

Instances details

HInit ('[] :: [Type]) Source # |
Instance details Defined in Data.HList.HList Methods hInit :: forall (l2 :: [Type]). Proxy l2 -> HList (Append ('[] :: [Type]) l2) -> HList ('[] :: [Type]) Source # hSplit :: forall (l2 :: [Type]). HList (Append ('[] :: [Type]) l2) -> (HList ('[] :: [Type]), HList l2) Source #
HInit l1 => HInit (x ': l1) Source # |
Instance details Defined in Data.HList.HList Methods hInit :: forall (l2 :: [Type]). Proxy l2 -> HList (Append (x ': l1) l2) -> HList (x ': l1) Source # hSplit :: forall (l2 :: [Type]). HList (Append (x ': l1) l2) -> (HList (x ': l1), HList l2) Source #