Actually commit function implementations modules

This commit is contained in:
Niels G. W. Serup 2024-09-21 23:11:50 +02:00
parent 5bbcc924b7
commit d5b8e2006c
No known key found for this signature in database
GPG Key ID: 38EEEBCE67324F19
2 changed files with 40 additions and 0 deletions

View File

@ -0,0 +1,25 @@
module FunctionImplementations.IO
( ListDirectory(..)
, ConvertImage(..)
, SaveFile(..)
, RunPandoc(..)
) where
import Sources()
import Types
data ListDirectory = ListDirectory deriving (Show)
instance IsFunctionIO ListDirectory FilePath [FilePath] where
runFIO ListDirectory _path = undefined
data ConvertImage = ConvertImage deriving (Show)
instance IsFunctionIO ConvertImage ((FilePath, FilePath), ImageConversionSettings) () where
runFIO ConvertImage ((_, _), ResizeToWidth _) = undefined
data SaveFile = SaveFile deriving (Show)
instance IsFunctionIO SaveFile (String, FilePath) () where
runFIO SaveFile _source = undefined
data RunPandoc = RunPandoc deriving (Show)
instance IsFunctionIO RunPandoc String String where
runFIO RunPandoc _source = undefined

View File

@ -0,0 +1,15 @@
module FunctionImplementations.Pure
( IsImageFilename(..)
, ConvertedImageFilename(..)
) where
import Sources()
import Types
data IsImageFilename = IsImageFilename deriving (Show)
instance IsFunction IsImageFilename FilePath Bool where
runF IsImageFilename _path = undefined
data ConvertedImageFilename = ConvertedImageFilename deriving (Show)
instance IsFunction ConvertedImageFilename FilePath FilePath where
runF ConvertedImageFilename _path = undefined