-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Haskus utility modules -- -- Haskus data utility modules @package haskus-utils-data @version 1.1.1 -- | Functor helpers module Haskus.Utils.Functor -- | An effectful version of hoist. -- -- Properties: -- --
-- transverse sequenceA = pure ---- -- Examples: -- -- The weird type of first argument allows user to decide an order of -- sequencing: -- --
-- >>> transverse (\x -> print (void x) *> sequence x) "foo" :: IO String -- Cons 'f' () -- Cons 'o' () -- Cons 'o' () -- Nil -- "foo" ---- --
-- >>> transverse (\x -> sequence x <* print (void x)) "foo" :: IO String -- Nil -- Cons 'o' () -- Cons 'o' () -- Cons 'f' () -- "foo" --transverse :: (Recursive s, Corecursive t, Functor f) => (forall a. () => Base s (f a) -> f (Base t a)) -> s -> f t -- | Effectful |fold|. -- -- This is a type specialisation of cata. -- -- An example terminating a recursion immediately: -- --
-- >>> cataA (\alg -> case alg of { Nil -> pure (); Cons a _ -> Const [a] }) "hello"
-- Const "h"
--
cataA :: Recursive t => (Base t (f a) -> f a) -> t -> f a
-- | Zygohistomorphic prepromorphisms:
--
-- A corrected and modernized version of
-- http://www.haskell.org/haskellwiki/Zygohistomorphic_prepromorphisms
zygoHistoPrepro :: (Corecursive t, Recursive t) => (Base t b -> b) -> (forall c. () => Base t c -> Base t c) -> (Base t (EnvT b (Cofree (Base t)) a) -> a) -> t -> a
-- | Elgot coalgebras:
-- http://comonad.com/reader/2008/elgot-coalgebras/
coelgot :: Functor f => ((a, f b) -> b) -> (a -> f a) -> a -> b
-- | Elgot algebras
elgot :: Functor f => (f a -> a) -> (b -> Either a (f b)) -> b -> a
-- | Mendler-style course-of-value iteration
mhisto :: () => (forall y. () => (y -> c) -> (y -> f y) -> f y -> c) -> Fix f -> c
-- | Mendler-style iteration
mcata :: () => (forall y. () => (y -> c) -> f y -> c) -> Fix f -> c
gchrono :: (Functor f, Functor w, Functor m, Comonad w, Monad m) => (forall c. () => f (w c) -> w (f c)) -> (forall c. () => m (f c) -> f (m c)) -> (f (CofreeT f w b) -> b) -> (a -> f (FreeT f m a)) -> a -> b
chrono :: Functor f => (f (Cofree f b) -> b) -> (a -> f (Free f a)) -> a -> b
distGHisto :: (Functor f, Functor h) => (forall b. () => f (h b) -> h (f b)) -> f (CofreeT f h a) -> CofreeT f h (f a)
distHisto :: Functor f => f (Cofree f a) -> Cofree f (f a)
ghisto :: (Recursive t, Comonad w) => (forall b. () => Base t (w b) -> w (Base t b)) -> (Base t (CofreeT (Base t) w a) -> a) -> t -> a
-- | Course-of-value iteration
histo :: Recursive t => (Base t (Cofree (Base t) a) -> a) -> t -> a
distGApoT :: (Functor f, Functor m) => (b -> f b) -> (forall c. () => m (f c) -> f (m c)) -> ExceptT b m (f a) -> f (ExceptT b m a)
distGApo :: Functor f => (b -> f b) -> Either b (f a) -> f (Either b a)
distApo :: Recursive t => Either t (Base t a) -> Base t (Either t a)
gapo :: Corecursive t => (b -> Base t b) -> (a -> Base t (Either b a)) -> a -> t
distZygoT :: (Functor f, Comonad w) => (f b -> b) -> (forall c. () => f (w c) -> w (f c)) -> f (EnvT b w a) -> EnvT b w (f a)
gzygo :: (Recursive t, Comonad w) => (Base t b -> b) -> (forall c. () => Base t (w c) -> w (Base t c)) -> (Base t (EnvT b w a) -> a) -> t -> a
distZygo :: Functor f => (f b -> b) -> f (b, a) -> (b, f a)
zygo :: Recursive t => (Base t b -> b) -> (Base t (b, a) -> a) -> t -> a
-- | A specialized, faster version of hoist for Nu.
hoistNu :: () => (forall a. () => f a -> g a) -> Nu f -> Nu g
-- | A specialized, faster version of hoist for Mu.
hoistMu :: () => (forall a. () => f a -> g a) -> Mu f -> Mu g
refix :: (Recursive s, Corecursive t, Base s ~ Base t) => s -> t
hoist :: (Recursive s, Corecursive t) => (forall a. () => Base s a -> Base t a) -> s -> t
unfix :: () => Fix f -> f (Fix f)
distGFutu :: (Functor f, Functor h) => (forall b. () => h (f b) -> f (h b)) -> FreeT f h (f a) -> f (FreeT f h a)
distFutu :: Functor f => Free f (f a) -> f (Free f a)
gfutu :: (Corecursive t, Functor m, Monad m) => (forall b. () => m (Base t b) -> Base t (m b)) -> (a -> Base t (FreeT (Base t) m a)) -> a -> t
futu :: Corecursive t => (a -> Base t (Free (Base t) a)) -> a -> t
-- | A generalized hylomorphism
grefold :: (Comonad w, Functor f, Monad m) => (forall c. () => f (w c) -> w (f c)) -> (forall d. () => m (f d) -> f (m d)) -> (f (w b) -> b) -> (a -> f (m a)) -> a -> b
-- | A generalized hylomorphism
ghylo :: (Comonad w, Functor f, Monad m) => (forall c. () => f (w c) -> w (f c)) -> (forall d. () => m (f d) -> f (m d)) -> (f (w b) -> b) -> (a -> f (m a)) -> a -> b
distAna :: Functor f => Identity (f a) -> f (Identity a)
-- | A generalized anamorphism
gunfold :: (Corecursive t, Monad m) => (forall b. () => m (Base t b) -> Base t (m b)) -> (a -> Base t (m a)) -> a -> t
-- | A generalized anamorphism
gana :: (Corecursive t, Monad m) => (forall b. () => m (Base t b) -> Base t (m b)) -> (a -> Base t (m a)) -> a -> t
distCata :: Functor f => f (Identity a) -> Identity (f a)
-- | A generalized catamorphism
gfold :: (Recursive t, Comonad w) => (forall b. () => Base t (w b) -> w (Base t b)) -> (Base t (w a) -> a) -> t -> a
-- | A generalized catamorphism
gcata :: (Recursive t, Comonad w) => (forall b. () => Base t (w b) -> w (Base t b)) -> (Base t (w a) -> a) -> t -> a
refold :: Functor f => (f b -> b) -> (a -> f a) -> a -> b
unfold :: Corecursive t => (a -> Base t a) -> a -> t
fold :: Recursive t => (Base t a -> a) -> t -> a
hylo :: Functor f => (f b -> b) -> (a -> f a) -> a -> b
distParaT :: (Corecursive t, Comonad w) => (forall b. () => Base t (w b) -> w (Base t b)) -> Base t (EnvT t w a) -> EnvT t w (Base t a)
distPara :: Corecursive t => Base t (t, a) -> (t, Base t a)
type family Base t :: Type -> Type
class Functor Base t => Recursive t
project :: Recursive t => t -> Base t t
cata :: Recursive t => (Base t a -> a) -> t -> a
para :: Recursive t => (Base t (t, a) -> a) -> t -> a
gpara :: (Recursive t, Corecursive t, Comonad w) => (forall b. () => Base t (w b) -> w (Base t b)) -> (Base t (EnvT t w a) -> a) -> t -> a
-- | Fokkinga's prepromorphism
prepro :: (Recursive t, Corecursive t) => (forall b. () => Base t b -> Base t b) -> (Base t a -> a) -> t -> a
gprepro :: (Recursive t, Corecursive t, Comonad w) => (forall b. () => Base t (w b) -> w (Base t b)) -> (forall c. () => Base t c -> Base t c) -> (Base t (w a) -> a) -> t -> a
class Functor Base t => Corecursive t
embed :: Corecursive t => Base t t -> t
ana :: Corecursive t => (a -> Base t a) -> a -> t
apo :: Corecursive t => (a -> Base t (Either t a)) -> a -> t
-- | Fokkinga's postpromorphism
postpro :: (Corecursive t, Recursive t) => (forall b. () => Base t b -> Base t b) -> (a -> Base t a) -> a -> t
-- | A generalized postpromorphism
gpostpro :: (Corecursive t, Recursive t, Monad m) => (forall b. () => m (Base t b) -> Base t (m b)) -> (forall c. () => Base t c -> Base t c) -> (a -> Base t (m a)) -> a -> t
newtype Fix (f :: Type -> Type)
Fix :: f (Fix f) -> Fix
newtype Mu (f :: Type -> Type)
Mu :: (forall a. () => (f a -> a) -> a) -> Mu
data Nu (f :: Type -> Type)
[Nu] :: forall (f :: Type -> Type) a. () => (a -> f a) -> a -> Nu f
module Haskus.Utils.List
-- | Check that a list has the given length (support infinite lists)
checkLength :: Word -> [a] -> Bool
module Haskus.Utils.Map
module Haskus.Utils.Map.Strict
-- | Utils for Maybe data type
module Haskus.Utils.Maybe
-- | Flipped fromMaybe
onNothing :: Maybe a -> a -> a
-- | Flipped fromMaybeM
onNothingM :: Monad m => m (Maybe a) -> m a -> m a
-- | fromMaybe in a Monad
fromMaybeM :: Monad m => m a -> m (Maybe a) -> m a
-- | Get the head of the list if the latter is not empty
headMaybe :: [a] -> Maybe a
-- | Utils for Monads
module Haskus.Utils.Monad
class MonadIO m => MonadInIO m
-- | Lift with*-like functions into IO (alloca, etc.)
liftWith :: MonadInIO m => (forall c. (a -> IO c) -> IO c) -> (a -> m b) -> m b
-- | Lift with*-like functions into IO (alloca, etc.)
liftWith2 :: MonadInIO m => (forall c. (a -> b -> IO c) -> IO c) -> (a -> b -> m e) -> m e
instance Haskus.Utils.Monad.MonadInIO GHC.Types.IO
instance Haskus.Utils.Monad.MonadInIO m => Haskus.Utils.Monad.MonadInIO (Control.Monad.Trans.State.Lazy.StateT s m)
-- | Tuple helpers
module Haskus.Utils.Tuple
-- | Uncurry specialised for triple
uncurry3 :: (a -> b -> c -> e) -> (a, b, c) -> e
-- | Uncurry specialised for quadruple
uncurry4 :: (a -> b -> c -> d -> e) -> (a, b, c, d) -> e
-- | Take specialised for quadruple
take4 :: [a] -> (a, a, a, a)
-- | toList for quadruple
fromTuple4 :: (a, a, a, a) -> [a]
-- | Singleton type
newtype Single a
Single :: a -> Single a
type family TupleToList (t :: k) :: [k]
type family ListToTuple (t :: [k]) :: k
-- | Extract a tuple value statically
class ExtractTuple (n :: Nat) t x | n t -> x
-- | Extract a tuple value by type-level index
tupleN :: ExtractTuple n t x => t -> x
class TupleHead ts ts' | ts -> ts'
tupleHead :: TupleHead ts ts' => ts -> ts'
class TupleTail ts ts' | ts -> ts'
tupleTail :: TupleTail ts ts' => ts -> ts'
class TupleCons t ts ts' | t ts -> ts'
tupleCons :: TupleCons t ts ts' => t -> ts -> ts'
-- | Reorder tuple elements
class ReorderTuple t1 t2
-- | Reorder tuple elements
tupleReorder :: ReorderTuple t1 t2 => t1 -> t2
instance GHC.Classes.Eq a => GHC.Classes.Eq (Haskus.Utils.Tuple.Single a)
instance GHC.Show.Show a => GHC.Show.Show (Haskus.Utils.Tuple.Single a)
instance Haskus.Utils.Tuple.ReorderTuple (Haskus.Utils.Tuple.Single a) (Haskus.Utils.Tuple.Single a)
instance Haskus.Utils.Tuple.ReorderTuple (a, b) (a, b)
instance Haskus.Utils.Tuple.ReorderTuple (a, b, c) (a, b, c)
instance Haskus.Utils.Tuple.ReorderTuple (a, b, c, d) (a, b, c, d)
instance Haskus.Utils.Tuple.ReorderTuple (a, b, c, d, e) (a, b, c, d, e)
instance Haskus.Utils.Tuple.ReorderTuple (a, b, c, d, e, f) (a, b, c, d, e, f)
instance Haskus.Utils.Tuple.ReorderTuple (a, b, c, d, e, f, g) (a, b, c, d, e, f, g)
instance Haskus.Utils.Tuple.ReorderTuple (a, b, c, d, e, f, g, h) (a, b, c, d, e, f, g, h)
instance Haskus.Utils.Tuple.ReorderTuple (a, b, c, d, e, f, g, h, i) (a, b, c, d, e, f, g, h, i)
instance Haskus.Utils.Tuple.ReorderTuple (a, b, c, d, e, f, g, h, i, j) (a, b, c, d, e, f, g, h, i, j)
instance Haskus.Utils.Tuple.ReorderTuple (a, b) (b, a)
instance Haskus.Utils.Tuple.ReorderTuple (a, b, c) (a, c, b)
instance Haskus.Utils.Tuple.ReorderTuple (a, b, c) (b, a, c)
instance Haskus.Utils.Tuple.ReorderTuple (a, b, c) (b, c, a)
instance Haskus.Utils.Tuple.ReorderTuple (a, b, c) (c, a, b)
instance Haskus.Utils.Tuple.ReorderTuple (a, b, c) (c, b, a)
instance Haskus.Utils.Tuple.ReorderTuple (b, c, d) (x, y, z) => Haskus.Utils.Tuple.ReorderTuple (a, b, c, d) (a, x, y, z)
instance Haskus.Utils.Tuple.ReorderTuple (a, c, d) (x, y, z) => Haskus.Utils.Tuple.ReorderTuple (a, b, c, d) (x, b, y, z)
instance Haskus.Utils.Tuple.ReorderTuple (a, b, d) (x, y, z) => Haskus.Utils.Tuple.ReorderTuple (a, b, c, d) (x, y, c, z)
instance Haskus.Utils.Tuple.ReorderTuple (a, b, c) (x, y, z) => Haskus.Utils.Tuple.ReorderTuple (a, b, c, d) (x, y, z, d)
instance Haskus.Utils.Tuple.ReorderTuple (b, c, d, e) (x, y, z, w) => Haskus.Utils.Tuple.ReorderTuple (a, b, c, d, e) (a, x, y, z, w)
instance Haskus.Utils.Tuple.ReorderTuple (a, c, d, e) (x, y, z, w) => Haskus.Utils.Tuple.ReorderTuple (a, b, c, d, e) (x, b, y, z, w)
instance Haskus.Utils.Tuple.ReorderTuple (a, b, d, e) (x, y, z, w) => Haskus.Utils.Tuple.ReorderTuple (a, b, c, d, e) (x, y, c, z, w)
instance Haskus.Utils.Tuple.ReorderTuple (a, b, c, e) (x, y, z, w) => Haskus.Utils.Tuple.ReorderTuple (a, b, c, d, e) (x, y, z, d, w)
instance Haskus.Utils.Tuple.ReorderTuple (a, b, c, d) (x, y, z, w) => Haskus.Utils.Tuple.ReorderTuple (a, b, c, d, e) (x, y, z, w, e)
instance Haskus.Utils.Tuple.ReorderTuple (b, c, d, e, f) (x, y, z, w, v) => Haskus.Utils.Tuple.ReorderTuple (a, b, c, d, e, f) (a, x, y, z, w, v)
instance Haskus.Utils.Tuple.ReorderTuple (a, c, d, e, f) (x, y, z, w, v) => Haskus.Utils.Tuple.ReorderTuple (a, b, c, d, e, f) (x, b, y, z, w, v)
instance Haskus.Utils.Tuple.ReorderTuple (a, b, d, e, f) (x, y, z, w, v) => Haskus.Utils.Tuple.ReorderTuple (a, b, c, d, e, f) (x, y, c, z, w, v)
instance Haskus.Utils.Tuple.ReorderTuple (a, b, c, e, f) (x, y, z, w, v) => Haskus.Utils.Tuple.ReorderTuple (a, b, c, d, e, f) (x, y, z, d, w, v)
instance Haskus.Utils.Tuple.ReorderTuple (a, b, c, d, f) (x, y, z, w, v) => Haskus.Utils.Tuple.ReorderTuple (a, b, c, d, e, f) (x, y, z, w, e, v)
instance Haskus.Utils.Tuple.ReorderTuple (a, b, c, d, e) (x, y, z, w, v) => Haskus.Utils.Tuple.ReorderTuple (a, b, c, d, e, f) (x, y, z, w, v, f)
instance Haskus.Utils.Tuple.ReorderTuple (b, c, d, e, f, g) (x, y, z, w, v, u) => Haskus.Utils.Tuple.ReorderTuple (a, b, c, d, e, f, g) (a, x, y, z, w, v, u)
instance Haskus.Utils.Tuple.ReorderTuple (a, c, d, e, f, g) (x, y, z, w, v, u) => Haskus.Utils.Tuple.ReorderTuple (a, b, c, d, e, f, g) (x, b, y, z, w, v, u)
instance Haskus.Utils.Tuple.ReorderTuple (a, b, d, e, f, g) (x, y, z, w, v, u) => Haskus.Utils.Tuple.ReorderTuple (a, b, c, d, e, f, g) (x, y, c, z, w, v, u)
instance Haskus.Utils.Tuple.ReorderTuple (a, b, c, e, f, g) (x, y, z, w, v, u) => Haskus.Utils.Tuple.ReorderTuple (a, b, c, d, e, f, g) (x, y, z, d, w, v, u)
instance Haskus.Utils.Tuple.ReorderTuple (a, b, c, d, f, g) (x, y, z, w, v, u) => Haskus.Utils.Tuple.ReorderTuple (a, b, c, d, e, f, g) (x, y, z, w, e, v, u)
instance Haskus.Utils.Tuple.ReorderTuple (a, b, c, d, e, g) (x, y, z, w, v, u) => Haskus.Utils.Tuple.ReorderTuple (a, b, c, d, e, f, g) (x, y, z, w, v, f, u)
instance Haskus.Utils.Tuple.ReorderTuple (a, b, c, d, e, f) (x, y, z, w, v, u) => Haskus.Utils.Tuple.ReorderTuple (a, b, c, d, e, f, g) (x, y, z, w, v, u, g)
instance Haskus.Utils.Tuple.TupleCons a (Haskus.Utils.Tuple.Single b) (a, b)
instance Haskus.Utils.Tuple.TupleCons a (b, c) (a, b, c)
instance Haskus.Utils.Tuple.TupleCons a (b, c, d) (a, b, c, d)
instance Haskus.Utils.Tuple.TupleCons a (b, c, d, e) (a, b, c, d, e)
instance Haskus.Utils.Tuple.TupleCons a (b, c, d, e, f) (a, b, c, d, e, f)
instance Haskus.Utils.Tuple.TupleTail (a, b) (Haskus.Utils.Tuple.Single b)
instance Haskus.Utils.Tuple.TupleTail (a, b, c) (b, c)
instance Haskus.Utils.Tuple.TupleTail (a, b, c, d) (b, c, d)
instance Haskus.Utils.Tuple.TupleTail (a, b, c, d, e) (b, c, d, e)
instance Haskus.Utils.Tuple.TupleTail (a, b, c, d, e, f) (b, c, d, e, f)
instance Haskus.Utils.Tuple.TupleHead (Haskus.Utils.Tuple.Single a) a
instance Haskus.Utils.Tuple.TupleHead (a, b) a
instance Haskus.Utils.Tuple.TupleHead (a, b, c) a
instance Haskus.Utils.Tuple.TupleHead (a, b, c, d) a
instance Haskus.Utils.Tuple.TupleHead (a, b, c, d, e) a
instance Haskus.Utils.Tuple.TupleHead (a, b, c, d, e, f) a
instance Haskus.Utils.Tuple.ExtractTuple 0 (Haskus.Utils.Tuple.Single t) t
instance Haskus.Utils.Tuple.ExtractTuple 0 (e0, e1) e0
instance Haskus.Utils.Tuple.ExtractTuple 1 (e0, e1) e1
instance Haskus.Utils.Tuple.ExtractTuple 0 (e0, e1, e2) e0
instance Haskus.Utils.Tuple.ExtractTuple 1 (e0, e1, e2) e1
instance Haskus.Utils.Tuple.ExtractTuple 2 (e0, e1, e2) e2
instance Haskus.Utils.Tuple.ExtractTuple 0 (e0, e1, e2, e3) e0
instance Haskus.Utils.Tuple.ExtractTuple 1 (e0, e1, e2, e3) e1
instance Haskus.Utils.Tuple.ExtractTuple 2 (e0, e1, e2, e3) e2
instance Haskus.Utils.Tuple.ExtractTuple 3 (e0, e1, e2, e3) e3
instance Haskus.Utils.Tuple.ExtractTuple 0 (e0, e1, e2, e3, e4) e0
instance Haskus.Utils.Tuple.ExtractTuple 1 (e0, e1, e2, e3, e4) e1
instance Haskus.Utils.Tuple.ExtractTuple 2 (e0, e1, e2, e3, e4) e2
instance Haskus.Utils.Tuple.ExtractTuple 3 (e0, e1, e2, e3, e4) e3
instance Haskus.Utils.Tuple.ExtractTuple 4 (e0, e1, e2, e3, e4) e4
instance Haskus.Utils.Tuple.ExtractTuple 0 (e0, e1, e2, e3, e4, e5) e0
instance Haskus.Utils.Tuple.ExtractTuple 1 (e0, e1, e2, e3, e4, e5) e1
instance Haskus.Utils.Tuple.ExtractTuple 2 (e0, e1, e2, e3, e4, e5) e2
instance Haskus.Utils.Tuple.ExtractTuple 3 (e0, e1, e2, e3, e4, e5) e3
instance Haskus.Utils.Tuple.ExtractTuple 4 (e0, e1, e2, e3, e4, e5) e4
instance Haskus.Utils.Tuple.ExtractTuple 5 (e0, e1, e2, e3, e4, e5) e5
instance Haskus.Utils.Tuple.ExtractTuple 0 (e0, e1, e2, e3, e4, e5, e6) e0
instance Haskus.Utils.Tuple.ExtractTuple 1 (e0, e1, e2, e3, e4, e5, e6) e1
instance Haskus.Utils.Tuple.ExtractTuple 2 (e0, e1, e2, e3, e4, e5, e6) e2
instance Haskus.Utils.Tuple.ExtractTuple 3 (e0, e1, e2, e3, e4, e5, e6) e3
instance Haskus.Utils.Tuple.ExtractTuple 4 (e0, e1, e2, e3, e4, e5, e6) e4
instance Haskus.Utils.Tuple.ExtractTuple 5 (e0, e1, e2, e3, e4, e5, e6) e5
instance Haskus.Utils.Tuple.ExtractTuple 6 (e0, e1, e2, e3, e4, e5, e6) e6
instance Haskus.Utils.Tuple.ExtractTuple 0 (e0, e1, e2, e3, e4, e5, e6, e7) e0
instance Haskus.Utils.Tuple.ExtractTuple 1 (e0, e1, e2, e3, e4, e5, e6, e7) e1
instance Haskus.Utils.Tuple.ExtractTuple 2 (e0, e1, e2, e3, e4, e5, e6, e7) e2
instance Haskus.Utils.Tuple.ExtractTuple 3 (e0, e1, e2, e3, e4, e5, e6, e7) e3
instance Haskus.Utils.Tuple.ExtractTuple 4 (e0, e1, e2, e3, e4, e5, e6, e7) e4
instance Haskus.Utils.Tuple.ExtractTuple 5 (e0, e1, e2, e3, e4, e5, e6, e7) e5
instance Haskus.Utils.Tuple.ExtractTuple 6 (e0, e1, e2, e3, e4, e5, e6, e7) e6
instance Haskus.Utils.Tuple.ExtractTuple 7 (e0, e1, e2, e3, e4, e5, e6, e7) e7
-- | Heterogeneous list utils
module Haskus.Utils.HList
-- | Heterogeneous list
data family HList (l :: [*])
infixr 2 `HCons`
-- | Head
hHead :: HList (e : l) -> e
-- | Tail
hTail :: HList (e : l) -> HList l
-- | Length
hLength :: forall xs. KnownNat (Length xs) => HList xs -> Word
hAppend :: HAppendList l1 l2 => HList l1 -> HList l2 -> HList (Concat l1 l2)
-- | Like HFoldr but only use types, not values!
--
-- It allows us to foldr over a list of types, without any associated
-- hlist of values.
class HFoldr' f v (l :: [*]) r
hFoldr' :: HFoldr' f v l r => f -> v -> HList l -> r
-- | Like HFoldl but only use types, not values!
--
-- It allows us to foldl over a list of types, without any associated
-- hlist of values.
class HFoldl' f (z :: *) xs (r :: *)
hFoldl' :: HFoldl' f z xs r => f -> z -> HList xs -> r
-- | Convert between hlists and tuples
class HTuple' v t | v -> t, t -> v
-- | Convert an heterogeneous list into a tuple
hToTuple' :: HTuple' v t => HList v -> t
-- | Convert a tuple into an heterogeneous list
hFromTuple' :: HTuple' v t => t -> HList v
-- | Apply the function identified by the data type f from type a to type
-- b.
class Apply f a b
apply :: Apply f a b => f -> a -> b
class HZipList x y l | x y -> l, l -> x y
hZipList :: HZipList x y l => HList x -> HList y -> HList l
class HFoldr f v (l :: [*]) r
hFoldr :: HFoldr f v l r => f -> v -> HList l -> r
class HFoldl f (z :: *) xs (r :: *)
hFoldl :: HFoldl f z xs r => f -> z -> HList xs -> r
class HReverse xs sx | xs -> sx, sx -> xs
hReverse :: HReverse xs sx => HList xs -> HList sx
instance GHC.Classes.Eq (Haskus.Utils.HList.HList '[])
instance (GHC.Classes.Eq x, GHC.Classes.Eq (Haskus.Utils.HList.HList xs)) => GHC.Classes.Eq (Haskus.Utils.HList.HList (x : xs))
instance GHC.Classes.Ord (Haskus.Utils.HList.HList '[])
instance (GHC.Classes.Ord x, GHC.Classes.Ord (Haskus.Utils.HList.HList xs)) => GHC.Classes.Ord (Haskus.Utils.HList.HList (x : xs))
instance Haskus.Utils.HList.HTuple' '[] ()
instance Haskus.Utils.HList.HTuple' '[a] (Haskus.Utils.Tuple.Single a)
instance Haskus.Utils.HList.HTuple' '[a, b] (a, b)
instance Haskus.Utils.HList.HTuple' '[a, b, c] (a, b, c)
instance Haskus.Utils.HList.HTuple' '[a, b, c, d] (a, b, c, d)
instance Haskus.Utils.HList.HTuple' '[a, b, c, d, e] (a, b, c, d, e)
instance Haskus.Utils.HList.HTuple' '[a, b, c, d, e, f] (a, b, c, d, e, f)
instance Haskus.Utils.HList.HTuple' '[a, b, c, d, e, f, g] (a, b, c, d, e, f, g)
instance Haskus.Utils.HList.HTuple' '[a, b, c, d, e, f, g, h] (a, b, c, d, e, f, g, h)
instance Haskus.Utils.HList.HTuple' '[a, b, c, d, e, f, g, h, i] (a, b, c, d, e, f, g, h, i)
instance Haskus.Utils.HList.HTuple' '[a, b, c, d, e, f, g, h, i, j] (a, b, c, d, e, f, g, h, i, j)
instance (Haskus.Utils.HList.HRevApp xs '[] sx, Haskus.Utils.HList.HRevApp sx '[] xs) => Haskus.Utils.HList.HReverse xs sx
instance Haskus.Utils.HList.HRevApp '[] l2 l2
instance Haskus.Utils.HList.HRevApp l (x : l') z => Haskus.Utils.HList.HRevApp (x : l) l' z
instance Haskus.Utils.HList.HZipList '[] '[] '[]
instance ((x, y) Data.Type.Equality.~ z, Haskus.Utils.HList.HZipList xs ys zs) => Haskus.Utils.HList.HZipList (x : xs) (y : ys) (z : zs)
instance (zx Data.Type.Equality.~ (z, x), Haskus.Utils.HList.Apply f zx z', Haskus.Utils.HList.HFoldl' f z' xs r) => Haskus.Utils.HList.HFoldl' f z (x : xs) r
instance (z Data.Type.Equality.~ z') => Haskus.Utils.HList.HFoldl' f z '[] z'
instance (zx Data.Type.Equality.~ (z, x), Haskus.Utils.HList.Apply f zx z', Haskus.Utils.HList.HFoldl f z' xs r) => Haskus.Utils.HList.HFoldl f z (x : xs) r
instance (z Data.Type.Equality.~ z') => Haskus.Utils.HList.HFoldl f z '[] z'
instance (v Data.Type.Equality.~ v') => Haskus.Utils.HList.HFoldr' f v '[] v'
instance (Haskus.Utils.HList.Apply f (e, r) r', Haskus.Utils.HList.HFoldr' f v l r) => Haskus.Utils.HList.HFoldr' f v (e : l) r'
instance (v Data.Type.Equality.~ v') => Haskus.Utils.HList.HFoldr f v '[] v'
instance (Haskus.Utils.HList.Apply f (e, r) r', Haskus.Utils.HList.HFoldr f v l r) => Haskus.Utils.HList.HFoldr f v (e : l) r'
instance Haskus.Utils.HList.HAppendList '[] l2
instance Haskus.Utils.HList.HAppendList l l' => Haskus.Utils.HList.HAppendList (x : l) l'
instance GHC.Show.Show (Haskus.Utils.HList.HList '[])
instance (GHC.Show.Show e, GHC.Show.Show (Haskus.Utils.HList.HList l)) => GHC.Show.Show (Haskus.Utils.HList.HList (e : l))