-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | preprocessor and library for Causal Commutative Arrows (CCA) -- -- A library that provides normalization support via Template Haskell for -- CCAs, and a modified preprocessor based on Ross Paterson's arrowp that -- reads Haskell with arrow notation and outputs Haskell 98 + Template -- Haskell sources for use with CCA library. @package CCA @version 0.1.3 module Language.Haskell.TH.Instances instance Lift Double instance Lift Rational instance Lift Callconv instance Lift Safety instance Lift Strict instance Lift Guard instance Lift Foreign instance Lift FunDep instance Lift Con instance Lift Clause instance Lift Body instance Lift NameSpace instance Lift Dec instance Lift Lit instance Lift Pat instance Lift Type instance Lift Match instance Lift Stmt instance Lift Range instance Lift NameFlavour instance Lift TyVarBndr instance Lift Kind instance Lift Pred instance Lift PkgName instance Lift ModName instance Lift OccName instance Lift Name instance Lift Exp instance Lift a => Lift (Q a) module Control.CCA.Types class (Arrow a, ArrowLoop a) => ArrowInit a init :: ArrowInit a => b -> a b b arr' :: ArrowInit a => ExpQ -> (b -> c) -> a b c init' :: ArrowInit a => ExpQ -> b -> a b b loopD :: ArrowInit a => e -> ((b, e) -> (c, e)) -> a b c module Control.CCA.CCNF norm :: ASyn t t1 -> ExpQ normOpt :: ASyn t t1 -> ExpQ pprNorm :: ASyn t t1 -> Q Exp pprNormOpt :: ASyn t t1 -> Q Exp printCCA :: ASyn t t1 -> IO () data ASyn b c cross :: (t -> t2) -> (t1 -> t3) -> (t, t1) -> (t2, t3) dup :: t -> (t, t) swap :: (t1, t) -> (t, t1) assoc :: ((t, t1), t2) -> (t, (t1, t2)) unassoc :: (t1, (t2, t)) -> ((t1, t2), t) juggle :: ((t1, t), t2) -> ((t1, t2), t) trace :: ((t1, t2) -> (t, t2)) -> t1 -> t mirror :: Either b a -> Either a b untag :: Either t t -> t tagT :: (Either t t1, t2) -> Either (t, t2) (t1, t2) untagT :: Either (a, t) (b, t) -> (Either a b, t) instance ArrowChoice ASyn instance ArrowInit ASyn instance ArrowLoop ASyn instance Arrow ASyn instance Category ASyn module Control.CCA -- | Left-to-right composition (>>>) :: Category cat => cat a b -> cat b c -> cat a c -- | Right-to-left composition (<<<) :: Category cat => cat b c -> cat a b -> cat a c -- | Send the first component of the input through the argument arrow, and -- copy the rest unchanged to the output. first :: Arrow a => forall b c d. a b c -> a (b, d) (c, d) -- | A mirror image of first. -- -- The default definition may be overridden with a more efficient version -- if desired. second :: Arrow a => forall b c d. a b c -> a (d, b) (d, c) -- | Split the input between the two argument arrows and combine their -- output. Note that this is in general not a functor. -- -- The default definition may be overridden with a more efficient version -- if desired. (***) :: Arrow a => forall b c b' c'. a b c -> a b' c' -> a (b, b') (c, c') -- | Fanout: send the input to both argument arrows and combine their -- output. -- -- The default definition may be overridden with a more efficient version -- if desired. (&&&) :: Arrow a => forall b c c'. a b c -> a b c' -> a b (c, c') loop :: ArrowLoop a => forall b d c. a (b, d) (c, d) -> a b c -- | The basic arrow class. -- -- Minimal complete definition: arr and first. -- -- The other combinators have sensible default definitions, which may be -- overridden for efficiency. class Category a => Arrow a :: (* -> * -> *) first :: Arrow a => a b c -> a (b, d) (c, d) second :: Arrow a => a b c -> a (d, b) (d, c) (***) :: Arrow a => a b c -> a b' c' -> a (b, b') (c, c') (&&&) :: Arrow a => a b c -> a b c' -> a b (c, c') -- | The loop operator expresses computations in which an output -- value is fed back as input, even though the computation occurs only -- once. It underlies the rec value recursion construct in arrow -- notation. class Arrow a => ArrowLoop a :: (* -> * -> *) loop :: ArrowLoop a => a (b, d) (c, d) -> a b c class (Arrow a, ArrowLoop a) => ArrowInit a arr' :: ArrowInit a => ExpQ -> (b -> c) -> a b c init' :: ArrowInit a => ExpQ -> b -> a b b arr :: ExpQ -> ExpQ init :: ExpQ -> ExpQ constant :: (ArrowInit a, Lift b) => b -> a () b norm :: ASyn t t1 -> ExpQ normOpt :: ASyn t t1 -> ExpQ