concat-classes-0.3.0.0: Constrained categories
Safe HaskellSafe-Inferred
LanguageHaskell2010

ConCat.Misc

Description

Miscellany

Synopsis

Documentation

type family as ++ bs where ... infixr 5 Source #

Equations

'[] ++ bs = bs 
(a : as) ++ bs = a : (as ++ bs) 

type C1 (con :: u -> Constraint) a = con a Source #

type C = Complex R Source #

type R = Double Source #

class (a, b) => a && b infixr 3 Source #

Instances

Instances details
(a, b) => a && b Source # 
Instance details

Defined in ConCat.Misc

type (:+) = Either infixl 6 Source #

class f b a => Flip f a b Source #

Instances

Instances details
f b a => Flip (f :: k1 -> k2 -> Constraint) (a :: k2) (b :: k1) Source # 
Instance details

Defined in ConCat.Misc

type (:=>) = (->) infixr 1 Source #

type (:*) = (,) infixl 7 Source #

newtype Parity Source #

Constructors

Parity 

Fields

Instances

Instances details
Monoid Parity Source # 
Instance details

Defined in ConCat.Misc

Semigroup Parity Source # 
Instance details

Defined in ConCat.Misc

HasRep Parity Source # 
Instance details

Defined in ConCat.Rep

Associated Types

type Rep Parity Source #

Newtype Parity Source # 
Instance details

Defined in ConCat.Misc

Associated Types

type O Parity Source #

type Rep Parity Source # 
Instance details

Defined in ConCat.Rep

type Rep Parity = Bool
type O Parity Source # 
Instance details

Defined in ConCat.Misc

type O Parity = Bool

type (:^) s n = n -> s infixr 8 Source #

type Binop a = a -> Unop a Source #

data PseudoFun Source #

Annotation for pseudo-function, i.e., defined by rules. During ccc generation, don't split applications. TODO: maybe add an arity.

Constructors

PseudoFun 

Fields

Instances

Instances details
Data PseudoFun Source # 
Instance details

Defined in ConCat.Misc

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> PseudoFun -> c PseudoFun Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c PseudoFun Source #

toConstr :: PseudoFun -> Constr Source #

dataTypeOf :: PseudoFun -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c PseudoFun) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c PseudoFun) Source #

gmapT :: (forall b. Data b => b -> b) -> PseudoFun -> PseudoFun Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> PseudoFun -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> PseudoFun -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> PseudoFun -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> PseudoFun -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> PseudoFun -> m PseudoFun Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> PseudoFun -> m PseudoFun Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> PseudoFun -> m PseudoFun Source #

class (a t, b t) => (a &+& b) t infixr 3 Source #

Instances

Instances details
(a t, b t) => ((a :: k -> Constraint) &+& (b :: k -> Constraint)) (t :: k) Source # 
Instance details

Defined in ConCat.Misc

(OpSat op con, OpSat op con') => OpCon (op :: k -> k -> k) (Sat (con &+& con') :: k -> Type) Source # 
Instance details

Defined in ConCat.Category

Methods

inOp :: forall (a :: k0) (b :: k0). (Sat (con &+& con') a && Sat (con &+& con') b) |- Sat (con &+& con') (op a b) Source #

type C2 (con :: u -> Constraint) a b = (con a, con b) Source #

type C3 (con :: u -> Constraint) a b c = (con a, con b, con c) Source #

type C4 (con :: u -> Constraint) a b c d = (con a, con b, con c, con d) Source #

type C5 (con :: u -> Constraint) a b c d e = (con a, con b, con c, con d, con e) Source #

type C6 (con :: u -> Constraint) a b c d e f = (con a, con b, con c, con d, con e, con f) Source #

type Unop a = a -> a Source #

type Ternop a = a -> Binop a Source #

class Yes0 Source #

Instances

Instances details
Yes0 Source # 
Instance details

Defined in ConCat.Misc

class Yes1 a Source #

Instances

Instances details
Yes1 (a :: k) Source # 
Instance details

Defined in ConCat.Misc

OpCon (op :: k -> k -> k) (Yes1' :: k -> Type) Source # 
Instance details

Defined in ConCat.Category

Methods

inOp :: forall (a :: k0) (b :: k0). (Yes1' a && Yes1' b) |- Yes1' (op a b) Source #

class Yes2 a b Source #

Instances

Instances details
Yes2 (a :: k1) (b :: k2) Source # 
Instance details

Defined in ConCat.Misc

type family FoldrC op b0 as where ... Source #

Equations

FoldrC op z '[] = z 
FoldrC op z (a : as) = a `op` FoldrC op z as 

type family MapC f us where ... Source #

Equations

MapC f '[] = '[] 
MapC f (u : us) = f u : MapC f us 

type AndC cs = FoldrC (&&) Yes0 cs Source #

type AllC f us = AndC (MapC f us) Source #

type family CrossWith f as bs where ... Source #

Equations

CrossWith f '[] bs = '[] 
CrossWith f (a : as) bs = MapC (f a) bs ++ CrossWith f as bs 

type AllC2 f as bs = AndC (CrossWith f as bs) Source #

transpose :: (Traversable t, Applicative f) => t (f a) -> f (t a) Source #

unzip :: Functor f => f (a :* b) -> f a :* f b Source #

xor :: Binop Bool infixr 3 Source #

compose :: Foldable f => f (Unop a) -> Unop a Source #

Compose list of unary transformations

delay :: a -> a Source #

Hack: delay inlining to thwart some of GHC's rewrites

int :: forall n. KnownNat n => Int Source #

inComp :: (g (f a) -> g' (f' a')) -> (g :.: f) a -> (g' :.: f') a' Source #

Apply a unary function within the Comp1 constructor.

inComp2 :: (g (f a) -> g' (f' a') -> g'' (f'' a'')) -> (g :.: f) a -> (g' :.: f') a' -> (g'' :.: f'') a'' Source #

Apply a binary function within the Comp1 constructor.

underF :: (Newtype n, Newtype n', o' ~ O n', o ~ O n, Functor f, Functor g) => (o -> n) -> (f n -> g n') -> f o -> g o' Source #

overF :: (Newtype n, Newtype n', o' ~ O n', o ~ O n, Functor f, Functor g) => (o -> n) -> (f o -> g o') -> f n -> g n' Source #

inNew2 :: (Newtype p, Newtype q, Newtype r) => (O p -> O q -> O r) -> p -> q -> r Source #

(<~) :: forall a b a' b'. (b -> b') -> (a' -> a) -> (a -> b) -> a' -> b' infixl 1 Source #

Add post- and pre-processing

(~>) :: forall a b a' b'. (a' -> a) -> (b -> b') -> (a -> b) -> a' -> b' infixr 1 Source #

Add pre- and post-processing

result :: (b -> c) -> (a -> b) -> a -> c Source #

inGeneric1 :: (Generic1 f, Generic1 g) => (Rep1 f a -> Rep1 g b) -> f a -> g b Source #

Operate inside a Generic1

absurdF :: V1 a -> b Source #

cond :: a -> a -> Bool -> a Source #

typeR :: forall a. Typeable a => TypeRep Source #

sqr :: Num a => a -> a Source #

magSqr :: Num a => (a :* a) -> a Source #

inTranspose :: (Applicative f, Traversable t, Applicative f', Traversable t') => (f (t a) -> t' (f' a)) -> t (f a) -> f' (t' a) Source #

natValAt :: forall n. KnownNat n => Integer Source #

nat :: forall n. KnownNat n => Integer Source #

inNew :: (Newtype p, Newtype q) => (O p -> O q) -> p -> q Source #

exNew :: (Newtype p, Newtype q) => (p -> q) -> O p -> O q Source #

exNew2 :: (Newtype p, Newtype q, Newtype r) => (p -> q -> r) -> O p -> O q -> O r Source #

oops :: String -> b Source #

Pseudo function to fool GHC's divergence checker.