proarrow
Safe HaskellNone
LanguageGHC2024

Proarrow.Tools.Diagrams.Dot

Documentation

newtype Vec (as :: k) x Source Comments #

Constructors

Vec 

Fields

Instances

Instances details
Functor (Vec as) Source Comments # 
Instance details

Defined in Proarrow.Tools.Diagrams.Dot

Methods

fmap :: (a -> b) -> Vec as a -> Vec as b Comments #

(<$) :: a -> Vec as b -> Vec as a Comments #

Foldable (Vec as) Source Comments # 
Instance details

Defined in Proarrow.Tools.Diagrams.Dot

Methods

fold :: Monoid m => Vec as m -> m Comments #

foldMap :: Monoid m => (a -> m) -> Vec as a -> m Comments #

foldMap' :: Monoid m => (a -> m) -> Vec as a -> m Comments #

foldr :: (a -> b -> b) -> b -> Vec as a -> b Comments #

foldr' :: (a -> b -> b) -> b -> Vec as a -> b Comments #

foldl :: (b -> a -> b) -> b -> Vec as a -> b Comments #

foldl' :: (b -> a -> b) -> b -> Vec as a -> b Comments #

foldr1 :: (a -> a -> a) -> Vec as a -> a Comments #

foldl1 :: (a -> a -> a) -> Vec as a -> a Comments #

toList :: Vec as a -> [a] Comments #

null :: Vec as a -> Bool Comments #

length :: Vec as a -> Int Comments #

elem :: Eq a => a -> Vec as a -> Bool Comments #

maximum :: Ord a => Vec as a -> a Comments #

minimum :: Ord a => Vec as a -> a Comments #

sum :: Num a => Vec as a -> a Comments #

product :: Num a => Vec as a -> a Comments #

Traversable (Vec as) Source Comments # 
Instance details

Defined in Proarrow.Tools.Diagrams.Dot

Methods

traverse :: Applicative f => (a -> f b) -> Vec as a -> f (Vec as b) Comments #

sequenceA :: Applicative f => Vec as (f a) -> f (Vec as a) Comments #

mapM :: Monad m => (a -> m b) -> Vec as a -> m (Vec as b) Comments #

sequence :: Monad m => Vec as (m a) -> m (Vec as a) Comments #

Show x => Show (Vec as x) Source Comments # 
Instance details

Defined in Proarrow.Tools.Diagrams.Dot

Methods

showsPrec :: Int -> Vec as x -> ShowS Comments #

show :: Vec as x -> String Comments #

showList :: [Vec as x] -> ShowS Comments #

Eq x => Eq (Vec as x) Source Comments # 
Instance details

Defined in Proarrow.Tools.Diagrams.Dot

Methods

(==) :: Vec as x -> Vec as x -> Bool Comments #

(/=) :: Vec as x -> Vec as x -> Bool Comments #

newtype Fin (as :: k) Source Comments #

Constructors

Fin 

Fields

Instances

Instances details
Num (Fin as) Source Comments # 
Instance details

Defined in Proarrow.Tools.Diagrams.Dot

Methods

(+) :: Fin as -> Fin as -> Fin as Comments #

(-) :: Fin as -> Fin as -> Fin as Comments #

(*) :: Fin as -> Fin as -> Fin as Comments #

negate :: Fin as -> Fin as Comments #

abs :: Fin as -> Fin as Comments #

signum :: Fin as -> Fin as Comments #

fromInteger :: Integer -> Fin as Comments #

Show (Fin as) Source Comments # 
Instance details

Defined in Proarrow.Tools.Diagrams.Dot

Methods

showsPrec :: Int -> Fin as -> ShowS Comments #

show :: Fin as -> String Comments #

showList :: [Fin as] -> ShowS Comments #

Eq (Fin as) Source Comments # 
Instance details

Defined in Proarrow.Tools.Diagrams.Dot

Methods

(==) :: Fin as -> Fin as -> Bool Comments #

(/=) :: Fin as -> Fin as -> Bool Comments #

(!) :: forall {k} (as :: k) x. Vec as x -> Fin as -> x Source Comments #

(+++) :: forall {k} (as :: [k]) x (bs :: [k]). Vec as x -> Vec bs x -> Vec (as ++ bs) x Source Comments #

split :: forall {k} (as :: [k]) (bs :: [k]) x. IsList as => Vec (as ++ bs) x -> (Vec as x, Vec bs x) Source Comments #

len :: forall {k} (as :: [k]). IsList as => Int Source Comments #

ixs :: forall {k} (as :: [k]). IsList as => Vec as (Fin as) Source Comments #

ixed :: forall {k} (as :: [k]) x. IsList as => Vec as x -> Vec as (Fin as, x) Source Comments #

zipV3 :: forall {k} (as :: k) x y z. Vec as x -> Vec as y -> Vec as z -> Vec as (x, y, z) Source Comments #

relax :: forall {k} (bs :: [k]) (as :: [k]). Fin as -> Fin (as ++ bs) Source Comments #

shift :: forall {k} (as :: [k]) (bs :: [k]). IsList as => Fin bs -> Fin (as ++ bs) Source Comments #

eitherF :: forall {k} (as :: [k]) (bs :: [k]) r. IsList as => (Fin as -> r) -> (Fin bs -> r) -> Fin (as ++ bs) -> r Source Comments #

names :: forall (as :: [Symbol]). IsList as => Vec as String Source Comments #

data SymRefl (a :: Symbol) (b :: Symbol) where Source Comments #

Constructors

SymRefl :: forall (a :: Symbol). KnownSymbol a => SymRefl a a 

Instances

Instances details
Promonad SymRefl Source Comments # 
Instance details

Defined in Proarrow.Tools.Diagrams.Dot

Methods

id :: forall (a :: Symbol). Ob a => SymRefl a a Source Comments #

(.) :: forall (b :: Symbol) (c :: Symbol) (a :: Symbol). SymRefl b c -> SymRefl a b -> SymRefl a c Source Comments #

Profunctor SymRefl Source Comments # 
Instance details

Defined in Proarrow.Tools.Diagrams.Dot

Methods

dimap :: forall (c :: Symbol) (a :: Symbol) (b :: Symbol) (d :: Symbol). (c ~> a) -> (b ~> d) -> SymRefl a b -> SymRefl c d Source Comments #

(\\) :: forall (a :: Symbol) (b :: Symbol) r. ((Ob a, Ob b) => r) -> SymRefl a b -> r Source Comments #

Show (SymRefl a b) Source Comments # 
Instance details

Defined in Proarrow.Tools.Diagrams.Dot

Eq (SymRefl a b) Source Comments # 
Instance details

Defined in Proarrow.Tools.Diagrams.Dot

Methods

(==) :: SymRefl a b -> SymRefl a b -> Bool Comments #

(/=) :: SymRefl a b -> SymRefl a b -> Bool Comments #

data DOT Source Comments #

Constructors

D [Symbol] 

Instances

Instances details
Monoidal DOT Source Comments # 
Instance details

Defined in Proarrow.Tools.Diagrams.Dot

Associated Types

type Unit 
Instance details

Defined in Proarrow.Tools.Diagrams.Dot

type Unit = 'D ('[] :: [Symbol])
type (ls :: DOT) ** (rs :: DOT) 
Instance details

Defined in Proarrow.Tools.Diagrams.Dot

type (ls :: DOT) ** (rs :: DOT) = 'D (UN 'D ls ++ UN 'D rs)

Methods

withOb2 :: forall (a :: DOT) (b :: DOT) r. (Ob a, Ob b) => (Ob (a ** b) => r) -> r Source Comments #

leftUnitor :: forall (a :: DOT). Ob a => ((Unit :: DOT) ** a) ~> a Source Comments #

leftUnitorInv :: forall (a :: DOT). Ob a => a ~> ((Unit :: DOT) ** a) Source Comments #

rightUnitor :: forall (a :: DOT). Ob a => (a ** (Unit :: DOT)) ~> a Source Comments #

rightUnitorInv :: forall (a :: DOT). Ob a => a ~> (a ** (Unit :: DOT)) Source Comments #

associator :: forall (a :: DOT) (b :: DOT) (c :: DOT). (Ob a, Ob b, Ob c) => ((a ** b) ** c) ~> (a ** (b ** c)) Source Comments #

associatorInv :: forall (a :: DOT) (b :: DOT) (c :: DOT). (Ob a, Ob b, Ob c) => (a ** (b ** c)) ~> ((a ** b) ** c) Source Comments #

SymMonoidal DOT Source Comments # 
Instance details

Defined in Proarrow.Tools.Diagrams.Dot

Methods

swap :: forall (a :: DOT) (b :: DOT). (Ob a, Ob b) => (a ** b) ~> (b ** a) Source Comments #

CategoryOf DOT Source Comments # 
Instance details

Defined in Proarrow.Tools.Diagrams.Dot

Associated Types

type (~>) 
Instance details

Defined in Proarrow.Tools.Diagrams.Dot

type (~>) = Dot
type Ob (a :: DOT) 
Instance details

Defined in Proarrow.Tools.Diagrams.Dot

type Ob (a :: DOT) = (Is 'D a, IsList (UN 'D a))
CopyDiscard DOT Source Comments # 
Instance details

Defined in Proarrow.Tools.Diagrams.Dot

Methods

copy :: forall (a :: DOT). Ob a => a ~> (a ** a) Source Comments #

discard :: forall (a :: DOT). Ob a => a ~> (Unit :: DOT) Source Comments #

MonoidalAction DOT DOT Source Comments # 
Instance details

Defined in Proarrow.Tools.Diagrams.Dot

Associated Types

type Act (a :: DOT) (x :: DOT) 
Instance details

Defined in Proarrow.Tools.Diagrams.Dot

type Act (a :: DOT) (x :: DOT) = a ** x

Methods

withObAct :: forall (a :: DOT) (x :: DOT) r. (Ob a, Ob x) => (Ob (Act a x) => r) -> r Source Comments #

unitor :: forall (x :: DOT). Ob x => Act (Unit :: DOT) x ~> x Source Comments #

unitorInv :: forall (x :: DOT). Ob x => x ~> Act (Unit :: DOT) x Source Comments #

multiplicator :: forall (a :: DOT) (b :: DOT) (x :: DOT). (Ob a, Ob b, Ob x) => Act a (Act b x) ~> Act (a ** b) x Source Comments #

multiplicatorInv :: forall (a :: DOT) (b :: DOT) (x :: DOT). (Ob a, Ob b, Ob x) => Act (a ** b) x ~> Act a (Act b x) Source Comments #

Promonad Dot Source Comments # 
Instance details

Defined in Proarrow.Tools.Diagrams.Dot

Methods

id :: forall (a :: DOT). Ob a => Dot a a Source Comments #

(.) :: forall (b :: DOT) (c :: DOT) (a :: DOT). Dot b c -> Dot a b -> Dot a c Source Comments #

MonoidalProfunctor Dot Source Comments # 
Instance details

Defined in Proarrow.Tools.Diagrams.Dot

Methods

par0 :: Dot (Unit :: DOT) (Unit :: DOT) Source Comments #

par :: forall (x1 :: DOT) (x2 :: DOT) (y1 :: DOT) (y2 :: DOT). Dot x1 x2 -> Dot y1 y2 -> Dot (x1 ** y1) (x2 ** y2) Source Comments #

Profunctor Dot Source Comments # 
Instance details

Defined in Proarrow.Tools.Diagrams.Dot

Methods

dimap :: forall (c :: DOT) (a :: DOT) (b :: DOT) (d :: DOT). (c ~> a) -> (b ~> d) -> Dot a b -> Dot c d Source Comments #

(\\) :: forall (a :: DOT) (b :: DOT) r. ((Ob a, Ob b) => r) -> Dot a b -> r Source Comments #

Costrong DOT Dot Source Comments # 
Instance details

Defined in Proarrow.Tools.Diagrams.Dot

Methods

coact :: forall (a :: DOT) (x :: DOT) (y :: DOT). (Ob a, Ob x, Ob y) => Dot (Act a x) (Act a y) -> Dot x y Source Comments #

Strong DOT (Id :: DOT -> DOT -> Type) Source Comments # 
Instance details

Defined in Proarrow.Tools.Diagrams.Dot

Methods

act :: forall (a :: DOT) (b :: DOT) (x :: DOT) (y :: DOT). (a ~> b) -> Id x y -> Id (Act a x) (Act b y) Source Comments #

Ob as => Comonoid ('D as :: DOT) Source Comments # 
Instance details

Defined in Proarrow.Tools.Diagrams.Dot

Methods

counit :: 'D as ~> (Unit :: DOT) Source Comments #

comult :: 'D as ~> ('D as ** 'D as) Source Comments #

Ob as => Monoid ('D as :: DOT) Source Comments # 
Instance details

Defined in Proarrow.Tools.Diagrams.Dot

Methods

mempty :: (Unit :: DOT) ~> 'D as Source Comments #

mappend :: ('D as ** 'D as) ~> 'D as Source Comments #

type Unit Source Comments # 
Instance details

Defined in Proarrow.Tools.Diagrams.Dot

type Unit = 'D ('[] :: [Symbol])
type (~>) Source Comments # 
Instance details

Defined in Proarrow.Tools.Diagrams.Dot

type (~>) = Dot
type Ob (a :: DOT) Source Comments # 
Instance details

Defined in Proarrow.Tools.Diagrams.Dot

type Ob (a :: DOT) = (Is 'D a, IsList (UN 'D a))
type (ls :: DOT) ** (rs :: DOT) Source Comments # 
Instance details

Defined in Proarrow.Tools.Diagrams.Dot

type (ls :: DOT) ** (rs :: DOT) = 'D (UN 'D ls ++ UN 'D rs)
type Act (a :: DOT) (x :: DOT) Source Comments # 
Instance details

Defined in Proarrow.Tools.Diagrams.Dot

type Act (a :: DOT) (x :: DOT) = a ** x
type UN 'D ('D ss :: DOT) Source Comments # 
Instance details

Defined in Proarrow.Tools.Diagrams.Dot

type UN 'D ('D ss :: DOT) = ss

data DotData (as :: k) (bs :: k1) Source Comments #

Constructors

DotData 

Fields

Instances

Instances details
Show (DotData as bs) Source Comments # 
Instance details

Defined in Proarrow.Tools.Diagrams.Dot

Methods

showsPrec :: Int -> DotData as bs -> ShowS Comments #

show :: DotData as bs -> String Comments #

showList :: [DotData as bs] -> ShowS Comments #

Eq (DotData as bs) Source Comments # 
Instance details

Defined in Proarrow.Tools.Diagrams.Dot

Methods

(==) :: DotData as bs -> DotData as bs -> Bool Comments #

(/=) :: DotData as bs -> DotData as bs -> Bool Comments #

data Dot (a :: DOT) (b :: DOT) where Source Comments #

Constructors

Dot :: forall (as :: [Symbol]) (bs :: [Symbol]). (IsList as, IsList bs) => (Int -> (Int, DotData as bs)) -> Dot ('D as) ('D bs) 

Instances

Instances details
Promonad Dot Source Comments # 
Instance details

Defined in Proarrow.Tools.Diagrams.Dot

Methods

id :: forall (a :: DOT). Ob a => Dot a a Source Comments #

(.) :: forall (b :: DOT) (c :: DOT) (a :: DOT). Dot b c -> Dot a b -> Dot a c Source Comments #

MonoidalProfunctor Dot Source Comments # 
Instance details

Defined in Proarrow.Tools.Diagrams.Dot

Methods

par0 :: Dot (Unit :: DOT) (Unit :: DOT) Source Comments #

par :: forall (x1 :: DOT) (x2 :: DOT) (y1 :: DOT) (y2 :: DOT). Dot x1 x2 -> Dot y1 y2 -> Dot (x1 ** y1) (x2 ** y2) Source Comments #

Profunctor Dot Source Comments # 
Instance details

Defined in Proarrow.Tools.Diagrams.Dot

Methods

dimap :: forall (c :: DOT) (a :: DOT) (b :: DOT) (d :: DOT). (c ~> a) -> (b ~> d) -> Dot a b -> Dot c d Source Comments #

(\\) :: forall (a :: DOT) (b :: DOT) r. ((Ob a, Ob b) => r) -> Dot a b -> r Source Comments #

Costrong DOT Dot Source Comments # 
Instance details

Defined in Proarrow.Tools.Diagrams.Dot

Methods

coact :: forall (a :: DOT) (x :: DOT) (y :: DOT). (Ob a, Ob x, Ob y) => Dot (Act a x) (Act a y) -> Dot x y Source Comments #

Show (Dot a b) Source Comments # 
Instance details

Defined in Proarrow.Tools.Diagrams.Dot

Methods

showsPrec :: Int -> Dot a b -> ShowS Comments #

show :: Dot a b -> String Comments #

showList :: [Dot a b] -> ShowS Comments #

Eq (Dot a b) Source Comments # 
Instance details

Defined in Proarrow.Tools.Diagrams.Dot

Methods

(==) :: Dot a b -> Dot a b -> Bool Comments #

(/=) :: Dot a b -> Dot a b -> Bool Comments #

swap2 :: forall (a :: Symbol) (b :: Symbol). (Ob a, Ob b) => Dot ('D '[a, b]) ('D '[b, a]) Source Comments #

swapNode :: forall (a :: Symbol) (b :: Symbol). (Ob a, Ob b) => Dot ('D '[a, b]) ('D '[b, a]) Source Comments #

node' :: forall (as :: [Symbol]) (bs :: [Symbol]). (IsList as, IsList bs) => Vec as String -> Vec bs String -> String -> Dot ('D as) ('D bs) Source Comments #

node :: forall (as :: [Symbol]) (bs :: [Symbol]). (IsList as, IsList bs) => String -> Dot ('D as) ('D bs) Source Comments #

line :: forall (a :: Symbol). Ob a => Dot ('D '[a]) ('D '[a]) Source Comments #

getData :: forall (as :: [Symbol]) (bs :: [Symbol]). Dot ('D as) ('D bs) -> DotData as bs Source Comments #

normalize :: forall {k1} {k2} (as :: k1) (bs :: k2). DotData as bs -> DotData as bs Source Comments #

run :: forall (as :: [Symbol]) (bs :: [Symbol]). Dot ('D as) ('D bs) -> String Source Comments #

unitAdj :: forall (l :: Symbol) (r :: Symbol). (Ob l, Ob r) => Dot ('D ('[] :: [Symbol])) ('D '[l, r]) Source Comments #

counitAdj :: forall (l :: Symbol) (r :: Symbol). (Ob l, Ob r) => Dot ('D '[r, l]) ('D ('[] :: [Symbol])) Source Comments #

Orphan instances

CategoryOf Symbol Source Comments # 
Instance details

Associated Types

type (~>) 
Instance details

Defined in Proarrow.Tools.Diagrams.Dot

type (~>) = SymRefl
type Ob (s :: Symbol) 
Instance details

Defined in Proarrow.Tools.Diagrams.Dot

type Ob (s :: Symbol) = KnownSymbol s