chatty-utils-0.7.3.5: Some utilities every serious chatty-based application may need.
Safe HaskellSafe
LanguageHaskell2010

Data.Chatty.Hetero

Synopsis

Documentation

data Cons a b Source #

The Cons type for a heterogenous list

Constructors

(:-:) a b infixr 9 

Instances

Instances details
Tuplify a ar => Tuplify (Cons a Nil) ar Source # 
Instance details

Defined in Data.Chatty.Hetero

Methods

tuplify :: Cons a Nil -> ar Source #

Append b c bc => Append (Cons a b) c (Cons a bc) Source # 
Instance details

Defined in Data.Chatty.Hetero

Methods

tappend :: Cons a b -> c -> Cons a bc Source #

(Tuplify a ar, Tuplify b br) => Tuplify (Cons a (Cons b Nil)) (ar, br) Source # 
Instance details

Defined in Data.Chatty.Hetero

Methods

tuplify :: Cons a (Cons b Nil) -> (ar, br) Source #

IntoMaybe (Cons a as) (Cons (Maybe (Cons a as)) Nil) Source # 
Instance details

Defined in Data.Chatty.Hetero

Methods

tjust :: Cons a as -> Cons (Maybe (Cons a as)) Nil Source #

tnothing :: Cons a as -> Cons (Maybe (Cons a as)) Nil Source #

(Tuplify a ar, Tuplify b br, Tuplify c cr) => Tuplify (Cons a (Cons b (Cons c Nil))) (ar, br, cr) Source # 
Instance details

Defined in Data.Chatty.Hetero

Methods

tuplify :: Cons a (Cons b (Cons c Nil)) -> (ar, br, cr) Source #

(Tuplify a ar, Tuplify b br, Tuplify c cr, Tuplify d dr) => Tuplify (Cons a (Cons b (Cons c (Cons d Nil)))) (ar, br, cr, dr) Source # 
Instance details

Defined in Data.Chatty.Hetero

Methods

tuplify :: Cons a (Cons b (Cons c (Cons d Nil))) -> (ar, br, cr, dr) Source #

(Tuplify a ar, Tuplify b br, Tuplify c cr, Tuplify d dr, Tuplify e er) => Tuplify (Cons a (Cons b (Cons c (Cons d (Cons e Nil))))) (ar, br, cr, dr, er) Source # 
Instance details

Defined in Data.Chatty.Hetero

Methods

tuplify :: Cons a (Cons b (Cons c (Cons d (Cons e Nil)))) -> (ar, br, cr, dr, er) Source #

(Tuplify a ar, Tuplify b br, Tuplify c cr, Tuplify d dr, Tuplify e er, Tuplify f fr) => Tuplify (Cons a (Cons b (Cons c (Cons d (Cons e (Cons f Nil)))))) (ar, br, cr, dr, er, fr) Source # 
Instance details

Defined in Data.Chatty.Hetero

Methods

tuplify :: Cons a (Cons b (Cons c (Cons d (Cons e (Cons f Nil))))) -> (ar, br, cr, dr, er, fr) Source #

data Nil Source #

The empty list

Constructors

Nil 

Instances

Instances details
Tuplify Nil () Source # 
Instance details

Defined in Data.Chatty.Hetero

Methods

tuplify :: Nil -> () Source #

IntoMaybe Nil Nil Source # 
Instance details

Defined in Data.Chatty.Hetero

Methods

tjust :: Nil -> Nil Source #

tnothing :: Nil -> Nil Source #

Append Nil b b Source # 
Instance details

Defined in Data.Chatty.Hetero

Methods

tappend :: Nil -> b -> b Source #

Tuplify a ar => Tuplify (Cons a Nil) ar Source # 
Instance details

Defined in Data.Chatty.Hetero

Methods

tuplify :: Cons a Nil -> ar Source #

(Tuplify a ar, Tuplify b br) => Tuplify (Cons a (Cons b Nil)) (ar, br) Source # 
Instance details

Defined in Data.Chatty.Hetero

Methods

tuplify :: Cons a (Cons b Nil) -> (ar, br) Source #

IntoMaybe (Cons a as) (Cons (Maybe (Cons a as)) Nil) Source # 
Instance details

Defined in Data.Chatty.Hetero

Methods

tjust :: Cons a as -> Cons (Maybe (Cons a as)) Nil Source #

tnothing :: Cons a as -> Cons (Maybe (Cons a as)) Nil Source #

(Tuplify a ar, Tuplify b br, Tuplify c cr) => Tuplify (Cons a (Cons b (Cons c Nil))) (ar, br, cr) Source # 
Instance details

Defined in Data.Chatty.Hetero

Methods

tuplify :: Cons a (Cons b (Cons c Nil)) -> (ar, br, cr) Source #

(Tuplify a ar, Tuplify b br, Tuplify c cr, Tuplify d dr) => Tuplify (Cons a (Cons b (Cons c (Cons d Nil)))) (ar, br, cr, dr) Source # 
Instance details

Defined in Data.Chatty.Hetero

Methods

tuplify :: Cons a (Cons b (Cons c (Cons d Nil))) -> (ar, br, cr, dr) Source #

(Tuplify a ar, Tuplify b br, Tuplify c cr, Tuplify d dr, Tuplify e er) => Tuplify (Cons a (Cons b (Cons c (Cons d (Cons e Nil))))) (ar, br, cr, dr, er) Source # 
Instance details

Defined in Data.Chatty.Hetero

Methods

tuplify :: Cons a (Cons b (Cons c (Cons d (Cons e Nil)))) -> (ar, br, cr, dr, er) Source #

(Tuplify a ar, Tuplify b br, Tuplify c cr, Tuplify d dr, Tuplify e er, Tuplify f fr) => Tuplify (Cons a (Cons b (Cons c (Cons d (Cons e (Cons f Nil)))))) (ar, br, cr, dr, er, fr) Source # 
Instance details

Defined in Data.Chatty.Hetero

Methods

tuplify :: Cons a (Cons b (Cons c (Cons d (Cons e (Cons f Nil))))) -> (ar, br, cr, dr, er, fr) Source #

class Append a b ab | a b -> ab where Source #

Typeclass for appending one heterogenous list to another one

Methods

tappend :: a -> b -> ab Source #

Instances

Instances details
Append Nil b b Source # 
Instance details

Defined in Data.Chatty.Hetero

Methods

tappend :: Nil -> b -> b Source #

Append b c bc => Append (Cons a b) c (Cons a bc) Source # 
Instance details

Defined in Data.Chatty.Hetero

Methods

tappend :: Cons a b -> c -> Cons a bc Source #

class IntoMaybe a ar | a -> ar where Source #

Typeclass for wrapping a heterogenous list into a Maybe on demand

Methods

tjust :: a -> ar Source #

tnothing :: a -> ar Source #

Instances

Instances details
IntoMaybe Nil Nil Source # 
Instance details

Defined in Data.Chatty.Hetero

Methods

tjust :: Nil -> Nil Source #

tnothing :: Nil -> Nil Source #

IntoMaybe (Cons a as) (Cons (Maybe (Cons a as)) Nil) Source # 
Instance details

Defined in Data.Chatty.Hetero

Methods

tjust :: Cons a as -> Cons (Maybe (Cons a as)) Nil Source #

tnothing :: Cons a as -> Cons (Maybe (Cons a as)) Nil Source #

class Tuplify l t | l -> t where Source #

Typeclass for everything that may be converted to a tuple

Methods

tuplify :: l -> t Source #

Instances

Instances details
Tuplify Char Char Source # 
Instance details

Defined in Data.Chatty.Hetero

Methods

tuplify :: Char -> Char Source #

Tuplify Int Int Source # 
Instance details

Defined in Data.Chatty.Hetero

Methods

tuplify :: Int -> Int Source #

Tuplify Nil () Source # 
Instance details

Defined in Data.Chatty.Hetero

Methods

tuplify :: Nil -> () Source #

Tuplify a ar => Tuplify (Titled a) ar Source # 
Instance details

Defined in Data.Chatty.Hetero

Methods

tuplify :: Titled a -> ar Source #

Tuplify a ar => Tuplify [a] [ar] Source # 
Instance details

Defined in Data.Chatty.Hetero

Methods

tuplify :: [a] -> [ar] Source #

Tuplify a ar => Tuplify (Maybe a) (Maybe ar) Source # 
Instance details

Defined in Data.Chatty.Hetero

Methods

tuplify :: Maybe a -> Maybe ar Source #

Tuplify a ar => Tuplify (Cons a Nil) ar Source # 
Instance details

Defined in Data.Chatty.Hetero

Methods

tuplify :: Cons a Nil -> ar Source #

(Tuplify a ar, Tuplify b br) => Tuplify (Cons a (Cons b Nil)) (ar, br) Source # 
Instance details

Defined in Data.Chatty.Hetero

Methods

tuplify :: Cons a (Cons b Nil) -> (ar, br) Source #

(Tuplify a ar, Tuplify b br, Tuplify c cr) => Tuplify (Cons a (Cons b (Cons c Nil))) (ar, br, cr) Source # 
Instance details

Defined in Data.Chatty.Hetero

Methods

tuplify :: Cons a (Cons b (Cons c Nil)) -> (ar, br, cr) Source #

(Tuplify a ar, Tuplify b br, Tuplify c cr, Tuplify d dr) => Tuplify (Cons a (Cons b (Cons c (Cons d Nil)))) (ar, br, cr, dr) Source # 
Instance details

Defined in Data.Chatty.Hetero

Methods

tuplify :: Cons a (Cons b (Cons c (Cons d Nil))) -> (ar, br, cr, dr) Source #

(Tuplify a ar, Tuplify b br, Tuplify c cr, Tuplify d dr, Tuplify e er) => Tuplify (Cons a (Cons b (Cons c (Cons d (Cons e Nil))))) (ar, br, cr, dr, er) Source # 
Instance details

Defined in Data.Chatty.Hetero

Methods

tuplify :: Cons a (Cons b (Cons c (Cons d (Cons e Nil)))) -> (ar, br, cr, dr, er) Source #

(Tuplify a ar, Tuplify b br, Tuplify c cr, Tuplify d dr, Tuplify e er, Tuplify f fr) => Tuplify (Cons a (Cons b (Cons c (Cons d (Cons e (Cons f Nil)))))) (ar, br, cr, dr, er, fr) Source # 
Instance details

Defined in Data.Chatty.Hetero

Methods

tuplify :: Cons a (Cons b (Cons c (Cons d (Cons e (Cons f Nil))))) -> (ar, br, cr, dr, er, fr) Source #

data Titled a Source #

Constructors

Titled String a 

Instances

Instances details
Tuplify a ar => Tuplify (Titled a) ar Source # 
Instance details

Defined in Data.Chatty.Hetero

Methods

tuplify :: Titled a -> ar Source #