Remove piping attempt

This commit is contained in:
Niels G. W. Serup 2024-09-21 16:38:37 +02:00
parent 20eaec927e
commit 6962c5cb17
No known key found for this signature in database
GPG Key ID: 38EEEBCE67324F19
1 changed files with 0 additions and 26 deletions

View File

@ -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