bluefin-0.0.8.0: The Bluefin effect system
Safe HaskellSafe-Inferred
LanguageHaskell2010

Bluefin.Pipes

Description

Reimplementation of the pipes (Pipes) ecosystem in Bluefin. It primarily serves as an example of what you can do with Bluefin and you probably won't want to use it directly. Instead you are recommended to use

See also Bluefin.Pipes.Prelude.

Synopsis

The Proxy handle

data Proxy a' a b' b (e :: Effects) #

runEffect #

Arguments

:: forall (es :: Effects) r. (forall (e :: Effects). Effect e -> Eff (e :& es) r) 
-> Eff es r

͘

Producers

type Producer = Proxy Void () () #

yield #

Arguments

:: forall (e :: Effects) (es :: Effects) x1 x a. e :> es 
=> Proxy x1 x () a e 
-> a 
-> Eff es ()

͘

for #

Arguments

:: forall (e1 :: Effects) (es :: Effects) x' x b' b a' c' c. e1 :> es 
=> (forall (e :: Effects). Proxy x' x b' b e -> Eff (e :& es) a') 
-> (b -> forall (e :: Effects). Proxy x' x c' c e -> Eff (e :& es) b') 
-> Proxy x' x c' c e1 
-> Eff es a'

͘

(~>) infixr 4 #

Arguments

:: forall (e1 :: Effects) (es :: Effects) a x' x b' b a' c' c. e1 :> es 
=> (a -> forall (e :: Effects). Proxy x' x b' b e -> Eff (e :& es) a') 
-> (b -> forall (e :: Effects). Proxy x' x c' c e -> Eff (e :& es) b') 
-> a 
-> Proxy x' x c' c e1 
-> Eff es a'

͘

(<~) infixl 4 #

Arguments

:: forall (e1 :: Effects) (es :: Effects) b x' x c' c b' a a'. e1 :> es 
=> (b -> forall (e :: Effects). Proxy x' x c' c e -> Eff (e :& es) b') 
-> (a -> forall (e :: Effects). Proxy x' x b' b e -> Eff (e :& es) a') 
-> a 
-> Proxy x' x c' c e1 
-> Eff es a'

͘

Consumers

type Consumer a = Pipe a Void #

await :: forall (e :: Effects) (es :: Effects) a y' y. e :> es => Proxy () a y' y e -> Eff es a #

(>~) infixl 5 #

Arguments

:: forall (e1 :: Effects) (es :: Effects) a' a y' y b c. e1 :> es 
=> (forall (e :: Effects). Proxy a' a y' y e -> Eff (e :& es) b) 
-> (forall (e :: Effects). Proxy () b y' y e -> Eff (e :& es) c) 
-> Proxy a' a y' y e1 
-> Eff es c

͘

(~<) infixr 5 #

Arguments

:: forall (e1 :: Effects) (es :: Effects) b y' y c a' a. e1 :> es 
=> (forall (e :: Effects). Proxy () b y' y e -> Eff (e :& es) c) 
-> (forall (e :: Effects). Proxy a' a y' y e -> Eff (e :& es) b) 
-> Proxy a' a y' y e1 
-> Eff es c

͘

Pipes

type Pipe a = Proxy () a () #

cat :: forall a (e :: Effects) (es :: Effects) r. Pipe a a e -> Eff (e :& es) r #

(>->) infixl 7 #

Arguments

:: forall (e1 :: Effects) (es :: Effects) a' a b r c' c. e1 :> es 
=> (forall (e :: Effects). Proxy a' a () b e -> Eff (e :& es) r) 
-> (forall (e :: Effects). Proxy () b c' c e -> Eff (e :& es) r) 
-> Proxy a' a c' c e1 
-> Eff es r

͘

(<-<) infixr 7 #

Arguments

:: forall (e1 :: Effects) (es :: Effects) b c' c r a' a. e1 :> es 
=> (forall (e :: Effects). Proxy () b c' c e -> Eff (e :& es) r) 
-> (forall (e :: Effects). Proxy a' a () b e -> Eff (e :& es) r) 
-> Proxy a' a c' c e1 
-> Eff es r

͘

Utilities

next :: () #

pipe's next doesn't exist in Bluefin

each #

Arguments

:: forall f a x' x (e :: Effects) (es :: Effects). Foldable f 
=> f a 
-> Proxy x' x () a e 
-> Eff (e :& es) ()

͘