container-1.0.1: Containers abstraction and utilities.

Safe HaskellNone
LanguageHaskell2010

Data.Container.Opts

Documentation

type family ParamsOf op cont :: [*] Source

Instances

type ParamsOf TracksIxesOp (Vector a) = [] * Source 
type ParamsOf IndexableOp (Vector a) = (:) * Unchecked ((:) * Try ([] *)) Source 
type ParamsOf FreeableOp (Vector a) = [] * Source 
type ParamsOf InsertableOp (Vector a) = [] * Source 
type ParamsOf RemovableOp (Vector a) = (:) * Try ([] *) Source 
type ParamsOf AddableOp (Vector a) = [] * Source 
type ParamsOf PrependableOp (Vector a) = [] * Source 
type ParamsOf AppendableOp (Vector a) = [] * Source 
type ParamsOf GrowableOp (Vector a) = [] * Source 
type ParamsOf ExpandableOp (Vector a) = [] * Source 
type ParamsOf AllocableOp (Vector a) = [] * Source 
type ParamsOf SingletonOp (Vector a) = [] * Source 
type ParamsOf MaxBoundedOp (Vector a) = [] * Source 
type ParamsOf MinBoundedOp (Vector a) = [] * Source 
type ParamsOf MeasurableOp (Vector a) = [] * Source 
type ParamsOf TracksElemsOp (Resizable s a) = ParamsOf TracksElemsOp (Container a) Source 
type ParamsOf TracksElemsOp (Reusable idx a) = [] * Source 
type ParamsOf TracksIxesOp (Resizable s a) = ParamsOf TracksIxesOp (Container a) Source 
type ParamsOf TracksIxesOp (Reusable idx a) = ParamsOf TracksIxesOp (Container a) Source 
type ParamsOf TracksUsedIxesOp (Resizable s a) = ParamsOf TracksUsedIxesOp (Container a) Source 
type ParamsOf TracksUsedIxesOp (Reusable idx a) = [] * Source 
type ParamsOf TracksFreeIxesOp (Resizable s a) = ParamsOf TracksFreeIxesOp (Container a) Source 
type ParamsOf TracksFreeIxesOp (Reusable idx a) = [] * Source 
type ParamsOf IndexableOp (Resizable s a) = ParamsOf IndexableOp (Container a) Source 
type ParamsOf IndexableOp (Reusable idx a) = ParamsOf IndexableOp (Container a) Source 
type ParamsOf ReservableOp (Reusable idx a) = [] * Source 
type ParamsOf FreeableOp (Resizable s a) = ParamsOf FreeableOp (Container a) Source 
type ParamsOf FreeableOp (Reusable idx a) = ParamsOf FreeableOp (Container a) Source 
type ParamsOf FreeableOp (Weak f a) = ParamsOf FreeableOp (Container a) Source 
type ParamsOf InsertableOp (Resizable s a) = ParamsOf InsertableOp (Container a) Source 
type ParamsOf InsertableOp (Reusable idx a) = (:) * Unchecked ((:) * Inplace (ParamsOf InsertableOp (Container a))) Source 
type ParamsOf RemovableOp (Resizable s a) = ParamsOf RemovableOp (Container a) Source 
type ParamsOf AddableOp (Resizable s a) = ParamsOf AddableOp (Container a) Source 
type ParamsOf AddableOp (Reusable idx a) = ParamsOf AddableOp (Container a) Source 
type ParamsOf AddableOp (Weak f a) = ParamsOf AddableOp (Container a) Source 
type ParamsOf PrependableOp (Resizable s a) = ParamsOf PrependableOp (Container a) Source 
type ParamsOf PrependableOp (Reusable idx a) = ParamsOf PrependableOp (Container a) Source 
type ParamsOf PrependableOp (Weak f a) = ParamsOf PrependableOp (Container a) Source 
type ParamsOf AppendableOp (Resizable s a) = ParamsOf AppendableOp (Container a) Source 
type ParamsOf AppendableOp (Reusable idx a) = ParamsOf AppendableOp (Container a) Source 
type ParamsOf AppendableOp (Weak f a) = ParamsOf AppendableOp (Container a) Source 
type ParamsOf GrowableOp (Resizable s a) = ParamsOf GrowableOp (Container a) Source 
type ParamsOf GrowableOp (Reusable idx a) = ParamsOf GrowableOp (Container a) Source 
type ParamsOf GrowableOp (Weak f a) = ParamsOf GrowableOp (Container a) Source 
type ParamsOf ExpandableOp (Resizable s a) = ParamsOf GrowableOp (Container a) Source 
type ParamsOf ExpandableOp (Reusable idx a) = ParamsOf ExpandableOp (Container a) Source 
type ParamsOf ExpandableOp (Weak f a) = ParamsOf GrowableOp (Container a) Source 
type ParamsOf AllocableOp (Resizable s a) = ParamsOf AllocableOp (Container a) Source 
type ParamsOf AllocableOp (Reusable idx a) = ParamsOf AllocableOp (Container a) Source 
type ParamsOf AllocableOp (Weak f a) = ParamsOf AllocableOp (Container a) Source 
type ParamsOf SingletonOp (Resizable s a) = ParamsOf SingletonOp (Container a) Source 
type ParamsOf SingletonOp (Reusable idx a) = ParamsOf SingletonOp (Container a) Source 
type ParamsOf SingletonOp (Weak f a) = ParamsOf SingletonOp (Container a) Source 
type ParamsOf MaxBoundedOp (Resizable s a) = ParamsOf MaxBoundedOp (Container a) Source 
type ParamsOf MaxBoundedOp (Reusable idx a) = ParamsOf MaxBoundedOp (Container a) Source 
type ParamsOf MaxBoundedOp (Weak f a) = ParamsOf MaxBoundedOp (Container a) Source 
type ParamsOf MinBoundedOp (Resizable s a) = ParamsOf MinBoundedOp (Container a) Source 
type ParamsOf MinBoundedOp (Reusable idx a) = ParamsOf MinBoundedOp (Container a) Source 
type ParamsOf MinBoundedOp (Weak f a) = ParamsOf MinBoundedOp (Container a) Source 
type ParamsOf MeasurableOp (Resizable s a) = ParamsOf MeasurableOp (Container a) Source 
type ParamsOf MeasurableOp (Reusable idx a) = ParamsOf MeasurableOp (Container a) Source 
type ParamsOf MeasurableOp (Weak f a) = ParamsOf MeasurableOp (Container a) Source 

type family ModsOf op cont :: [*] Source

Instances

type ModsOf TracksIxesOp (Vector a) = [] * Source 
type ModsOf IndexableOp (Vector a) = (:) * Ixed ([] *) Source 
type ModsOf FreeableOp (Vector a) = [] * Source 
type ModsOf InsertableOp (Vector a) = (:) * Ixed ([] *) Source 
type ModsOf RemovableOp (Vector a) = (:) * Ixed ([] *) Source 
type ModsOf AddableOp (Vector a) = (:) * Ixed ([] *) Source 
type ModsOf PrependableOp (Vector a) = (:) * Ixed ([] *) Source 
type ModsOf AppendableOp (Vector a) = (:) * Ixed ([] *) Source 
type ModsOf GrowableOp (Vector a) = (:) * Ixed ([] *) Source 
type ModsOf ExpandableOp (Vector a) = (:) * Ixed ([] *) Source 
type ModsOf AllocableOp (Vector a) = (:) * Ixed ([] *) Source 
type ModsOf SingletonOp (Vector a) = (:) * Ixed ([] *) Source 
type ModsOf MaxBoundedOp (Vector a) = [] * Source 
type ModsOf MinBoundedOp (Vector a) = [] * Source 
type ModsOf MeasurableOp (Vector a) = [] * Source 
type ModsOf TracksElemsOp (Resizable s a) = ModsOf TracksElemsOp (Container a) Source 
type ModsOf TracksElemsOp (Reusable idx a) = [] * Source 
type ModsOf TracksIxesOp (Resizable s a) = ModsOf TracksIxesOp (Container a) Source 
type ModsOf TracksIxesOp (Reusable idx a) = ModsOf TracksIxesOp (Container a) Source 
type ModsOf TracksUsedIxesOp (Resizable s a) = ModsOf TracksUsedIxesOp (Container a) Source 
type ModsOf TracksUsedIxesOp (Reusable idx a) = [] * Source 
type ModsOf TracksFreeIxesOp (Resizable s a) = ModsOf TracksFreeIxesOp (Container a) Source 
type ModsOf TracksFreeIxesOp (Reusable idx a) = [] * Source 
type ModsOf IndexableOp (Resizable s a) = ModsOf IndexableOp (Container a) Source 
type ModsOf IndexableOp (Reusable idx a) = ModsOf IndexableOp (Container a) Source 
type ModsOf ReservableOp (Reusable idx a) = (:) * Ixed ([] *) Source 
type ModsOf FreeableOp (Resizable s a) = ModsOf FreeableOp (Container a) Source 
type ModsOf FreeableOp (Reusable idx a) = ModsOf FreeableOp (Container a) Source 
type ModsOf FreeableOp (Weak f a) = ModsOf FreeableOp (Container a) Source 
type ModsOf InsertableOp (Resizable s a) = ModsOf InsertableOp (Container a) Source 
type ModsOf InsertableOp (Reusable idx a) = ModsOf InsertableOp (Container a) Source 
type ModsOf RemovableOp (Resizable s a) = ModsOf RemovableOp (Container a) Source 
type ModsOf AddableOp (Resizable s a) = ModsOf AddableOp (Container a) Source 
type ModsOf AddableOp (Reusable idx a) = ModsOf AddableOp (Container a) Source 
type ModsOf AddableOp (Weak f a) = ModsOf AddableOp (Container a) Source 
type ModsOf PrependableOp (Resizable s a) = ModsOf PrependableOp (Container a) Source 
type ModsOf PrependableOp (Reusable idx a) = ModsOf PrependableOp (Container a) Source 
type ModsOf PrependableOp (Weak f a) = ModsOf PrependableOp (Container a) Source 
type ModsOf AppendableOp (Resizable s a) = ModsOf AppendableOp (Container a) Source 
type ModsOf AppendableOp (Reusable idx a) = ModsOf AppendableOp (Container a) Source 
type ModsOf AppendableOp (Weak f a) = ModsOf AppendableOp (Container a) Source 
type ModsOf GrowableOp (Resizable s a) = ModsOf GrowableOp (Container a) Source 
type ModsOf GrowableOp (Reusable idx a) = ModsOf GrowableOp (Container a) Source 
type ModsOf GrowableOp (Weak f a) = ModsOf GrowableOp (Container a) Source 
type ModsOf ExpandableOp (Resizable s a) = ModsOf GrowableOp (Container a) Source 
type ModsOf ExpandableOp (Reusable idx a) = ModsOf ExpandableOp (Container a) Source 
type ModsOf ExpandableOp (Weak f a) = ModsOf GrowableOp (Container a) Source 
type ModsOf AllocableOp (Resizable s a) = ModsOf AllocableOp (Container a) Source 
type ModsOf AllocableOp (Reusable idx a) = ModsOf AllocableOp (Container a) Source 
type ModsOf AllocableOp (Weak f a) = ModsOf AllocableOp (Container a) Source 
type ModsOf SingletonOp (Resizable s a) = ModsOf SingletonOp (Container a) Source 
type ModsOf SingletonOp (Reusable idx a) = ModsOf SingletonOp (Container a) Source 
type ModsOf SingletonOp (Weak f a) = ModsOf SingletonOp (Container a) Source 
type ModsOf MaxBoundedOp (Resizable s a) = ModsOf MaxBoundedOp (Container a) Source 
type ModsOf MaxBoundedOp (Reusable idx a) = ModsOf MaxBoundedOp (Container a) Source 
type ModsOf MaxBoundedOp (Weak f a) = ModsOf MaxBoundedOp (Container a) Source 
type ModsOf MinBoundedOp (Resizable s a) = ModsOf MinBoundedOp (Container a) Source 
type ModsOf MinBoundedOp (Reusable idx a) = ModsOf MinBoundedOp (Container a) Source 
type ModsOf MinBoundedOp (Weak f a) = ModsOf MinBoundedOp (Container a) Source 
type ModsOf MeasurableOp (Resizable s a) = ModsOf MeasurableOp (Container a) Source 
type ModsOf MeasurableOp (Reusable idx a) = ModsOf MeasurableOp (Container a) Source 
type ModsOf MeasurableOp (Weak f a) = ModsOf MeasurableOp (Container a) Source 

data Opt a Source

Constructors

P a 
N 

Instances

(InsertableQM (GetOpts ms) (GetOpts ps) m idx el a, (~) * idx idx') => InsertableQM_ ms ((:) (Opt *) (P * Unchecked) ((:) (Opt *) (P * Inplace) ps)) m idx el (Reusable idx' a) Source 
Show a => Show (Opt a) Source 
(TracksUsedIxes idx (Reusable idx a), Indexable idx el (Reusable idx a), Monad m) => TracksElemsQM_ ([] (Opt *)) ps m el (Reusable idx a) Source 
(TracksIxes idx (Reusable idx a), TracksFreeIxes idx (Reusable idx a), (~) * idx idx', Monad m, Eq idx) => TracksUsedIxesQM_ ([] (Opt *)) ps m idx (Reusable idx' a) Source 
(Monad m, (~) * idx idx') => TracksFreeIxesQM_ ([] (Opt *)) ps m idx (Reusable idx' a) Source 
(Monad m, (~) * idx (Index (Container a))) => ReservableQM_ ((:) (Opt *) (P * Ixed) ([] (Opt *))) ps m (Reusable idx a) Source 

data Knowledge a Source

Constructors

Known a 
Unknown 

Instances

Show a => Show (Knowledge a) Source 
type ConstrainCls TracksElemsOp ms ps (Info (Knowledge *) (Knowledge *) * idx (Known * el)) m = TracksElemsQM_ ms ps m el Source 
type ConstrainCls TracksIxesOp ms ps (Info (Knowledge *) (Knowledge *) * (Known * idx) el) m = TracksIxesQM_ ms ps m idx Source 
type ConstrainCls TracksUsedIxesOp ms ps (Info (Knowledge *) (Knowledge *) * (Known * idx) el) m = TracksUsedIxesQM_ ms ps m idx Source 
type ConstrainCls TracksFreeIxesOp ms ps (Info (Knowledge *) (Knowledge *) * (Known * idx) el) m = TracksFreeIxesQM_ ms ps m idx Source 
type ConstrainCls IndexableOp ms ps (Info (Knowledge *) (Knowledge *) * (Known * idx) (Known * el)) m = IndexableQM_ ms ps m idx el Source 
type ConstrainCls FreeableOp ms ps (Info (Knowledge *) (Knowledge *) * (Known * idx) el) m = FreeableQM_ ms ps m idx Source 
type ConstrainCls InsertableOp ms ps (Info (Knowledge *) (Knowledge *) * (Known * idx) (Known * el)) m = InsertableQM_ ms ps m idx el Source 
type ConstrainCls RemovableOp ms ps (Info (Knowledge *) (Knowledge *) * idx (Known * el)) m = RemovableQM_ ms ps m el Source 
type ConstrainCls AddableOp ms ps (Info (Knowledge *) (Knowledge *) * idx (Known * el)) m = AddableQM_ ms ps m el Source 
type ConstrainCls PrependableOp ms ps (Info (Knowledge *) (Knowledge *) * idx (Known * el)) m = PrependableQM_ ms ps m el Source 
type ConstrainCls AppendableOp ms ps (Info (Knowledge *) (Knowledge *) * idx (Known * el)) m = AppendableQM_ ms ps m el Source 
type ConstrainCls SingletonOp ms ps (Info (Knowledge *) (Knowledge *) * idx (Known * el)) m = SingletonQM_ ms ps m el Source 
type ConstrainCls MaxBoundedOp ms ps (Info (Knowledge *) (Knowledge *) * (Known * idx) el) m = MaxBoundedQM_ ms ps m idx Source 
type ConstrainCls MinBoundedOp ms ps (Info (Knowledge *) (Knowledge *) * (Known * idx) el) m = MinBoundedQM_ ms ps m idx Source 
type ModResult op (Info (Knowledge *) (Knowledge *) * (Unknown *) el cont) Ixed = IdxMod op (Index cont) Source 
type ModResult op (Info (Knowledge *) (Knowledge *) * (Known * idx) el cont) Ixed = IdxMod op idx Source 

data Ixed Source

Constructors

Ixed 

Instances

(Monad m, (~) * idx (Index (Container a))) => ReservableQM_ ((:) (Opt *) (P * Ixed) ([] (Opt *))) ps m (Reusable idx a) Source 
type ModResult op (Info (Knowledge *) (Knowledge *) * (Unknown *) el cont) Ixed = IdxMod op (Index cont) Source 
type ModResult op (Info (Knowledge *) (Knowledge *) * (Known * idx) el cont) Ixed = IdxMod op idx Source 

data Safe Source

Constructors

Safe 

data Unchecked Source

Constructors

Unchecked 

Instances

(InsertableQM (GetOpts ms) (GetOpts ps) m idx el a, (~) * idx idx') => InsertableQM_ ms ((:) (Opt *) (P * Unchecked) ((:) (Opt *) (P * Inplace) ps)) m idx el (Reusable idx' a) Source 

data Unsafe Source

Constructors

Unsafe 

data Inplace Source

Constructors

Inplace 

Instances

(InsertableQM (GetOpts ms) (GetOpts ps) m idx el a, (~) * idx idx') => InsertableQM_ ms ((:) (Opt *) (P * Unchecked) ((:) (Opt *) (P * Inplace) ps)) m idx el (Reusable idx' a) Source 

data Try Source

Constructors

Try 

data Raw Source

Constructors

Raw 

type family MatchOpts provided selected :: [Opt *] Source

Equations

MatchOpts (p : ps) sel = (p `CheckIfKnown` sel) : MatchOpts ps sel 
MatchOpts `[]` sel = `[]` 

type family CheckIfKnown flag flags :: Opt * Source

Equations

CheckIfKnown f (f : fs) = P f 
CheckIfKnown f (f' : fs) = CheckIfKnown f fs 
CheckIfKnown f `[]` = N 

data Query mods params Source

Constructors

Query 

data OptQuery mods params Source

Constructors

OptQuery 

newtype OptBuilder mods params a Source

Constructors

OptBuilder a 

Instances

((~) [*] mods mods', (~) [*] params params', (~) * f f') => FuncTrans mods params f (OptBuilder mods' params' f') Source 
Functor (OptBuilder mods params) Source 
((~) * t (f -> g), (~) [*] mods ([] *), (~) [*] params ([] *)) => FuncBuilder (f -> g) (OptBuilder mods params t) Source 
Show a => Show (OptBuilder mods params a) Source 

class FuncTrans mods params f a | a mods params -> f where Source

Methods

transFunc :: OptBuilder mods params f -> a Source

Instances

(~) * f (Query mods params -> a -> b) => FuncTrans mods params f (a -> b) Source 
((~) [*] mods mods', (~) [*] params params', (~) * f f') => FuncTrans mods params f (OptBuilder mods' params' f') Source 

class FuncBuilder f a | a -> f where Source

Methods

buildFunc :: f -> a Source

Instances

((~) * f a, (~) * g b) => FuncBuilder (f -> g) (a -> b) Source 
((~) * t (f -> g), (~) [*] mods ([] *), (~) [*] params ([] *)) => FuncBuilder (f -> g) (OptBuilder mods params t) Source 

queryBuilder :: FuncTrans `[]` `[]` f a => f -> a Source

extendOptBuilder :: Query newMods newParams -> Query collectedMods collectedParams -> OptBuilder mods params a -> OptBuilder (Concat newMods (Concat collectedMods mods)) (Concat newParams (Concat collectedParams params)) a Source

appFunc :: (f -> g) -> OptBuilder ms ps f -> OptBuilder ms ps g Source

withTransFunc :: FuncTrans mods params f c => (f1 -> f) -> OptBuilder mods params f1 -> c Source

type Concat lst lst' = Concat' (Reverse lst) lst' Source

type family Concat' lst lst' Source

Equations

Concat' (x : xs) lst = Concat' xs (x : lst) 
Concat' `[]` lst = lst 

type Reverse lst = Reverse' lst `[]` Source

type family Reverse' lst lst' Source

Equations

Reverse' `[]` lst = lst 
Reverse' (l : ls) lst = Reverse' ls (l : lst) 

type family OptData provided datas opt Source

Equations

OptData (o : ps) (d, ds) o = d 
OptData (p : ps) (d, ds) o = OptData ps ds o 

type family QueryData provided query datas Source

Equations

QueryData p (q : qs) d = (OptData p d q, QueryData p qs d) 
QueryData p `[]` d = () 

class GetOptData provided datas opt where Source

Methods

getOptData :: Proxy provided -> datas -> Proxy opt -> OptData provided datas opt Source

Instances

(~) * datas (a, as) => GetOptData ((:) * p ps) datas p Source 
((~) * datas (a, as), GetOptData ps as o, (~) * (OptData * ps as o) (OptData * ((:) * p ps) (a, as) o)) => GetOptData ((:) * p ps) datas o Source 

class GetQueryData provided query datas where Source

Methods

getQueryData :: Proxy provided -> Proxy query -> datas -> QueryData provided query datas Source

Instances

GetQueryData p ([] *) datas Source 
(GetQueryData p qs datas, GetOptData p datas q) => GetQueryData p ((:) * q qs) datas Source 

(.:) :: (b -> c) -> (a -> a1 -> b) -> a -> a1 -> c Source

ixed :: (FuncTrans ((:) * Ixed (Concat' * (Reverse' collectedMods ([] *)) mods)) (Concat' * (Reverse' collectedParams ([] *)) params) f c, FuncTrans ([] *) ([] *) (Query collectedMods collectedParams -> OptBuilder mods params f -> c) a) => a Source

raw :: (FuncTrans (Concat' * (Reverse' collectedMods ([] *)) mods) ((:) * Raw (Concat' * (Reverse' collectedParams ([] *)) params)) f c, FuncTrans ([] *) ([] *) (Query collectedMods collectedParams -> OptBuilder mods params f -> c) a) => a Source

try :: (FuncTrans (Concat' * (Reverse' collectedMods ([] *)) mods) ((:) * Try (Concat' * (Reverse' collectedParams ([] *)) params)) f c, FuncTrans ([] *) ([] *) (Query collectedMods collectedParams -> OptBuilder mods params f -> c) a) => a Source

unchecked :: (FuncTrans (Concat' * (Reverse' collectedMods ([] *)) mods) ((:) * Unchecked (Concat' * (Reverse' collectedParams ([] *)) params)) f c, FuncTrans ([] *) ([] *) (Query collectedMods collectedParams -> OptBuilder mods params f -> c) a) => a Source

unsafe :: (FuncTrans (Concat' * (Reverse' collectedMods ([] *)) mods) ((:) * Unsafe (Concat' * (Reverse' collectedParams ([] *)) params)) f c, FuncTrans ([] *) ([] *) (Query collectedMods collectedParams -> OptBuilder mods params f -> c) a) => a Source

inplace :: (FuncTrans (Concat' * (Reverse' collectedMods ([] *)) mods) ((:) * Inplace (Concat' * (Reverse' collectedParams ([] *)) params)) f c, FuncTrans ([] *) ([] *) (Query collectedMods collectedParams -> OptBuilder mods params f -> c) a) => a Source