Remove piping attempt
This commit is contained in:
parent
20eaec927e
commit
6962c5cb17
|
@ -31,32 +31,6 @@ data FunctionIO a b where
|
||||||
|
|
||||||
deriving instance Show (FunctionIO a b)
|
deriving instance Show (FunctionIO a b)
|
||||||
|
|
||||||
data Computation a b where
|
|
||||||
Pipe :: Computation t u -> Computation u v -> Computation t v
|
|
||||||
Duplicate :: Computation t (t, t)
|
|
||||||
PairWith :: Computation t u -> Computation () u1 -> Computation t (u, u1)
|
|
||||||
TupleComputation :: Computation t0 u0 -> Computation t1 u1 -> Computation (t0, t1) (u0, u1)
|
|
||||||
-- OnFirst :: Computation t0 u0 -> Computation (t0, t1) (u0, u1)
|
|
||||||
-- OnSecond :: Computation t1 u1 -> Computation (t0, t1) (u0, u1)
|
|
||||||
MapComputation :: Computation t u -> Computation [t] [u]
|
|
||||||
MapUnit :: Computation [()] ()
|
|
||||||
FilterComputation :: Computation t Bool -> Computation [t] [t]
|
|
||||||
Inject :: t -> Computation () t
|
|
||||||
Run :: Function t u -> Computation t u
|
|
||||||
RunIO :: FunctionIO t u -> Computation t u
|
|
||||||
|
|
||||||
handleImages :: Computation () ()
|
|
||||||
handleImages =
|
|
||||||
Inject "retter"
|
|
||||||
`Pipe` (RunIO ListDirectory)
|
|
||||||
`Pipe` FilterComputation (Run IsImageFilename)
|
|
||||||
`Pipe` MapComputation (Duplicate
|
|
||||||
`Pipe` (TupleComputation
|
|
||||||
(PairWith (RunIO OpenImage) (Inject ImageConversion)
|
|
||||||
`Pipe` RunIO ConvertImage)
|
|
||||||
(Run ConvertedImageFilename))
|
|
||||||
`Pipe` RunIO Save)
|
|
||||||
`Pipe` MapUnit
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue