concat-examples-0.3.0.0: Some examples of compiling to categories
Safe HaskellSafe-Inferred
LanguageHaskell2010

ConCat.Syntactic

Description

Syntactic CCC

Documentation

newtype Syn a b Source #

Constructors

Syn DocTree 

Instances

Instances details
AssociativePCat Syn Source # 
Instance details

Defined in ConCat.Syntactic

Methods

lassocP :: Ok3 Syn a b c => Syn (Prod Syn a (Prod Syn b c)) (Prod Syn (Prod Syn a b) c) Source #

rassocP :: Ok3 Syn a b c => Syn (Prod Syn (Prod Syn a b) c) (Prod Syn a (Prod Syn b c)) Source #

AssociativeSCat Syn Source # 
Instance details

Defined in ConCat.Syntactic

Methods

lassocS :: Oks Syn '[a, b, c] => Syn (Coprod Syn a (Coprod Syn b c)) (Coprod Syn (Coprod Syn a b) c) Source #

rassocS :: Oks Syn '[a, b, c] => Syn (Coprod Syn (Coprod Syn a b) c) (Coprod Syn a (Coprod Syn b c)) Source #

BoolCat Syn Source # 
Instance details

Defined in ConCat.Syntactic

BraidedPCat Syn Source # 
Instance details

Defined in ConCat.Syntactic

Methods

swapP :: Ok2 Syn a b => Syn (Prod Syn a b) (Prod Syn b a) Source #

BraidedSCat Syn Source # 
Instance details

Defined in ConCat.Syntactic

Methods

swapS :: Ok2 Syn a b => Syn (Coprod Syn a b) (Coprod Syn b a) Source #

Category Syn Source # 
Instance details

Defined in ConCat.Syntactic

Associated Types

type Ok Syn :: Type -> Constraint Source #

Methods

id :: Ok Syn a => Syn a a Source #

(.) :: forall b c a. Ok3 Syn a b c => Syn b c -> Syn a b -> Syn a c Source #

ClosedCat Syn Source # 
Instance details

Defined in ConCat.Syntactic

Methods

apply :: Ok2 Syn a b => Syn (Prod Syn (Exp Syn a b) a) b Source #

curry :: Ok3 Syn a b c => Syn (Prod Syn a b) c -> Syn a (Exp Syn b c) Source #

uncurry :: Ok3 Syn a b c => Syn a (Exp Syn b c) -> Syn (Prod Syn a b) c Source #

CoproductCat Syn Source # 
Instance details

Defined in ConCat.Syntactic

Methods

inl :: Ok2 Syn a b => Syn a (Coprod Syn a b) Source #

inr :: Ok2 Syn a b => Syn b (Coprod Syn a b) Source #

jam :: Ok Syn a => Syn (Coprod Syn a a) a Source #

CoproductPCat Syn Source # 
Instance details

Defined in ConCat.Syntactic

Methods

inlP :: Ok2 Syn a b => Syn a (CoprodP Syn a b) Source #

inrP :: Ok2 Syn a b => Syn b (CoprodP Syn a b) Source #

jamP :: Ok Syn a => Syn (CoprodP Syn a a) a Source #

DistribCat Syn Source # 
Instance details

Defined in ConCat.Syntactic

Methods

distl :: Ok3 Syn a u v => Syn (Prod Syn a (Coprod Syn u v)) (Coprod Syn (Prod Syn a u) (Prod Syn a v)) Source #

distr :: Ok3 Syn u v b => Syn (Prod Syn (Coprod Syn u v) b) (Coprod Syn (Prod Syn u b) (Prod Syn v b)) Source #

FiniteCat Syn Source # 
Instance details

Defined in ConCat.Syntactic

Methods

unFinite :: forall (n :: Nat). KnownNat n => Syn (Finite n) Int Source #

unsafeFinite :: forall (n :: Nat). KnownNat n => Syn Int (Finite n) Source #

MonoidalPCat Syn Source # 
Instance details

Defined in ConCat.Syntactic

Methods

(***) :: Ok4 Syn a b c d => Syn a c -> Syn b d -> Syn (Prod Syn a b) (Prod Syn c d) Source #

first :: forall a a' b. Ok3 Syn a b a' => Syn a a' -> Syn (Prod Syn a b) (Prod Syn a' b) Source #

second :: Ok3 Syn a b b' => Syn b b' -> Syn (Prod Syn a b) (Prod Syn a b') Source #

MonoidalSCat Syn Source # 
Instance details

Defined in ConCat.Syntactic

Methods

(+++) :: Ok4 Syn a b c d => Syn c a -> Syn d b -> Syn (Coprod Syn c d) (Coprod Syn a b) Source #

left :: forall a a' b. Oks Syn '[a, b, a'] => Syn a a' -> Syn (Coprod Syn a b) (Coprod Syn a' b) Source #

right :: Oks Syn '[a, b, b'] => Syn b b' -> Syn (Coprod Syn a b) (Coprod Syn a b') Source #

ProductCat Syn Source # 
Instance details

Defined in ConCat.Syntactic

Methods

exl :: Ok2 Syn a b => Syn (Prod Syn a b) a Source #

exr :: Ok2 Syn a b => Syn (Prod Syn a b) b Source #

dup :: Ok Syn a => Syn a (Prod Syn a a) Source #

TerminalCat Syn Source # 
Instance details

Defined in ConCat.Syntactic

Methods

it :: Ok Syn a => Syn a (Unit Syn) Source #

UnitCat Syn Source # 
Instance details

Defined in ConCat.Syntactic

Methods

lunit :: Ok Syn a => Syn a (Prod Syn (Unit Syn) a) Source #

lcounit :: Ok Syn a => Syn (Prod Syn (Unit Syn) a) a Source #

runit :: Ok Syn a => Syn a (Prod Syn a (Unit Syn)) Source #

rcounit :: Ok Syn a => Syn (Prod Syn a (Unit Syn)) a Source #

ConstCat Syn Integer Source # 
Instance details

Defined in ConCat.Syntactic

ConstCat Syn () Source # 
Instance details

Defined in ConCat.Syntactic

Methods

const :: Ok Syn a => () -> Syn a (ConstObj Syn ()) Source #

unitArrow :: () -> Syn (Unit Syn) (ConstObj Syn ()) Source #

ConstCat Syn Bool Source # 
Instance details

Defined in ConCat.Syntactic

ConstCat Syn Double Source # 
Instance details

Defined in ConCat.Syntactic

ConstCat Syn Float Source # 
Instance details

Defined in ConCat.Syntactic

ConstCat Syn Int Source # 
Instance details

Defined in ConCat.Syntactic

EnumCat Syn a Source # 
Instance details

Defined in ConCat.Syntactic

Methods

succC :: Syn a a Source #

predC :: Syn a a Source #

EqCat Syn a Source # 
Instance details

Defined in ConCat.Syntactic

FloatingCat Syn a Source # 
Instance details

Defined in ConCat.Syntactic

Methods

expC :: Syn a a Source #

logC :: Syn a a Source #

cosC :: Syn a a Source #

sinC :: Syn a a Source #

sqrtC :: Syn a a Source #

tanhC :: Syn a a Source #

FractionalCat Syn a Source # 
Instance details

Defined in ConCat.Syntactic

Methods

recipC :: Syn a a Source #

divideC :: Syn (Prod Syn a a) a Source #

Functor h => FunctorCat Syn h Source # 
Instance details

Defined in ConCat.Syntactic

Methods

fmapC :: Ok2 Syn a b => Syn a b -> Syn (h a) (h b) Source #

unzipC :: Ok2 Syn a b => Syn (h (a :* b)) (h a :* h b) Source #

IfCat Syn a Source # 
Instance details

Defined in ConCat.Syntactic

Methods

ifC :: IfT Syn a Source #

IntegralCat Syn a Source # 
Instance details

Defined in ConCat.Syntactic

Methods

divC :: Syn (Prod Syn a a) a Source #

modC :: Syn (Prod Syn a a) a Source #

(OkIxProd Syn h, Representable h, Zip h, Traversable h, Show (Rep h)) => IxCoproductPCat Syn h Source # 
Instance details

Defined in ConCat.Syntactic

Methods

inPF :: Ok Syn a => h (Syn a (h a)) Source #

joinPF :: Ok2 Syn a b => h (Syn b a) -> Syn (h b) a Source #

jamPF :: Ok Syn a => Syn (h a) a Source #

(Functor h, Foldable h) => IxMonoidalPCat Syn h Source # 
Instance details

Defined in ConCat.Syntactic

Methods

crossF :: Ok2 Syn a b => h (Syn a b) -> Syn (h a) (h b) Source #

(OkIxProd Syn h, Representable h, Foldable h, Show (Rep h)) => IxProductCat Syn h Source # 
Instance details

Defined in ConCat.Syntactic

Methods

exF :: Ok Syn a => h (Syn (h a) a) Source #

forkF :: Ok2 Syn a b => h (Syn a b) -> Syn a (h b) Source #

replF :: Ok Syn a => Syn a (h a) Source #

MinMaxCat Syn a Source # 
Instance details

Defined in ConCat.Syntactic

Methods

minC :: Syn (Prod Syn a a) a Source #

maxC :: Syn (Prod Syn a a) a Source #

NumCat Syn a Source # 
Instance details

Defined in ConCat.Syntactic

Methods

negateC :: Syn a a Source #

addC :: Syn (Prod Syn a a) a Source #

subC :: Syn (Prod Syn a a) a Source #

mulC :: Syn (Prod Syn a a) a Source #

powIC :: Syn (Prod Syn a Int) a Source #

OkFunctor Syn h Source # 
Instance details

Defined in ConCat.Syntactic

Methods

okFunctor :: Ok' Syn a |- Ok' Syn (h a) Source #

OkIxProd Syn h Source # 
Instance details

Defined in ConCat.Syntactic

Methods

okIxProd :: Ok' Syn a |- Ok' Syn (h a) Source #

Ord a => OrdCat Syn a Source # 
Instance details

Defined in ConCat.Syntactic

RepresentableCat Syn g Source # 
Instance details

Defined in ConCat.Syntactic

Methods

tabulateC :: Ok Syn a => Syn (Rep g -> a) (g a) Source #

indexC :: Ok Syn a => Syn (g a) (Rep g -> a) Source #

Zip h => ZipCat Syn h Source # 
Instance details

Defined in ConCat.Syntactic

Methods

zipC :: Ok2 Syn a b => Syn (h a :* h b) (h (a :* b)) Source #

(Foldable h, Additive a) => AddCat Syn h a Source # 
Instance details

Defined in ConCat.Syntactic

Methods

sumAC :: Syn (h a) a Source #

DistributiveCat Syn g f Source # 
Instance details

Defined in ConCat.Syntactic

Methods

distributeC :: Ok Syn a => Syn (f (g a)) (g (f a)) Source #

(Foldable h, Ord a) => MinMaxFFunctorCat Syn h a Source # 
Instance details

Defined in ConCat.Syntactic

Methods

minimumCF :: h a -> a :* Syn (h a) a Source #

maximumCF :: h a -> a :* Syn (h a) a Source #

(Foldable h, Ord a) => MinMaxFunctorCat Syn h a Source # 
Instance details

Defined in ConCat.Syntactic

Methods

minimumC :: Syn (h a) a Source #

maximumC :: Syn (h a) a Source #

PointedCat Syn h a Source # 
Instance details

Defined in ConCat.Syntactic

Methods

pointC :: Syn a (h a) Source #

RealFracCat Syn a b Source # 
Instance details

Defined in ConCat.Syntactic

Methods

floorC :: Syn a b Source #

ceilingC :: Syn a b Source #

truncateC :: Syn a b Source #

Show2 Syn Source # 
Instance details

Defined in ConCat.Syntactic

Methods

show2 :: forall (a :: k) (b :: k1). Syn a b -> String Source #

(r ~ Rep a, T a, T r) => RepCat Syn (a :: Type) (r :: Type) Source # 
Instance details

Defined in ConCat.Syntactic

Methods

reprC :: Syn a r Source #

abstC :: Syn r a Source #

BottomCat Syn (a :: Type) (b :: Type) Source # 
Instance details

Defined in ConCat.Syntactic

Methods

bottomC :: Syn a b Source #

(Typeable a, Typeable b) => CoerceCat Syn (a :: Type) (b :: Type) Source # 
Instance details

Defined in ConCat.Syntactic

Methods

coerceC :: Syn a b Source #

FromIntegralCat Syn (a :: Type) (b :: Type) Source # 
Instance details

Defined in ConCat.Syntactic

UnknownCat Syn (a :: Type) (b :: Type) Source # 
Instance details

Defined in ConCat.Syntactic

Methods

unknownC :: Syn a b Source #

KnownNat n => ConstCat Syn (Finite n) Source # 
Instance details

Defined in ConCat.Syntactic

Methods

const :: Ok Syn a => Finite n -> Syn a (ConstObj Syn (Finite n)) Source #

unitArrow :: Finite n -> Syn (Unit Syn) (ConstObj Syn (Finite n)) Source #

(ConstCat Syn a, Show a, KnownNat n) => ConstCat Syn (Vector n a) Source # 
Instance details

Defined in ConCat.Syntactic

Methods

const :: Ok Syn a0 => Vector n a -> Syn a0 (ConstObj Syn (Vector n a)) Source #

unitArrow :: Vector n a -> Syn (Unit Syn) (ConstObj Syn (Vector n a)) Source #

Show (Syn a b) Source # 
Instance details

Defined in ConCat.Syntactic

Methods

showsPrec :: Int -> Syn a b -> ShowS Source #

show :: Syn a b -> String Source #

showList :: [Syn a b] -> ShowS Source #

HasRep (Syn a b) Source # 
Instance details

Defined in ConCat.Syntactic

Associated Types

type Rep (Syn a b) Source #

Methods

repr :: Syn a b -> Rep (Syn a b) Source #

abst :: Rep (Syn a b) -> Syn a b Source #

type Ok Syn Source # 
Instance details

Defined in ConCat.Syntactic

type Ok Syn = Yes1 :: Type -> Constraint
type Rep (Syn a b) Source # 
Instance details

Defined in ConCat.Syntactic

type Rep (Syn a b) = DocTree

atom :: Pretty a => a -> Syn a b Source #

app0 :: String -> Syn a b Source #

app1 :: String -> Syn a b -> Syn c d Source #

app2 :: String -> Syn a b -> Syn c d -> Syn e f Source #

apps :: (Functor h, Foldable h) => String -> h (Syn a b) -> Syn c d Source #

atomicConst :: Show b => b -> Syn a b Source #

type T = Yes1 Source #

addTy :: forall t. Unop String Source #

app0' :: forall a b. (T a, T b) => String -> Syn a b Source #

type Assoc = (Prec -> Prec, Prec -> Prec) Source #

type PDoc = Prec -> Doc Source #

ppretty :: Pretty a => a -> PDoc Source #