Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- type (+) = Either
- type * = (,)
- type (.) = Compose
- newtype CofreeF f a k = CofreeF {
- runCofreeF :: a * f k
- newtype FreeF f a k = FreeF {}
- type CofreeTF f w a = w . CofreeF f a
- type CofreeT f w a = Fix (CofreeTF f w a)
- pattern CofreeT :: w (CofreeF f a (CofreeT f w a)) -> CofreeT f w a
- pattern FreeT :: m (FreeF f a (FreeT f m a)) -> FreeT f m a
- type FreeTF f m a = m . FreeF f a
- type FreeT f m a = Fix (FreeTF f m a)
- type CoHeapF w a = CofreeTF [] ((,) w) a
- type HeapF w a = FreeTF ((,) w) [] a
- type CoHeap w a = CofreeT [] ((,) w) a
- type Heap w a = FreeT ((,) w) [] a
- traceT :: (Comonad w, Functor f) => (w a -> b) -> (w a -> f (w a)) -> w a -> CofreeT f w b
- evalT :: (Functor f, Monad m) => (a -> m b) -> (f (m b) -> m b) -> FreeT f m a -> m b
- pattern Root :: w -> a -> [CoHeap w a] -> CoHeap w a
- pattern RootF :: w -> a -> [CoHeap w a] -> CoHeapF w a (CoHeap w a)
- newtype Fix f = Fix {}
- apo :: Functor f => (a -> f (Fix f + a)) -> a -> Fix f
- cata :: Functor f => (f a -> a) -> Fix f -> a
- para :: Functor f => (f (Fix f * a) -> a) -> Fix f -> a
- ana :: Functor f => (a -> f a) -> a -> Fix f
- type NEListF w a = (,) w . CofreeF Maybe a
- type Pairing w a = Maybe (CoHeap w a) -> Maybe (CoHeap w a)
- pcons :: Monus w => CoHeap w a -> Pairing w a -> Pairing w a
- pnil :: Pairing w a
- prun :: Pairing w a -> Maybe (CoHeap w a)
- popMin :: Monus w => CoHeap w a -> NEListF w a (CoHeap w a)
- (<+>) :: Monus w => CoHeap w a -> CoHeap w a -> CoHeap w a
- class Comonoid a where
- class Comonoid' a where
Documentation
class Comonoid a where Source #
A class for things that can be decomposed in a coassiciative way.
split x == (y :| []) ==> x == y all unital (unfoldr split x) where unital x = snd x == Nothing