From d5b8e2006cbf666776d081052f1b8e7923b53457 Mon Sep 17 00:00:00 2001 From: "Niels G. W. Serup" Date: Sat, 21 Sep 2024 23:11:50 +0200 Subject: [PATCH] Actually commit function implementations modules --- byg/src/FunctionImplementations/IO.hs | 25 +++++++++++++++++++++++++ byg/src/FunctionImplementations/Pure.hs | 15 +++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 byg/src/FunctionImplementations/IO.hs create mode 100644 byg/src/FunctionImplementations/Pure.hs diff --git a/byg/src/FunctionImplementations/IO.hs b/byg/src/FunctionImplementations/IO.hs new file mode 100644 index 0000000..20413fa --- /dev/null +++ b/byg/src/FunctionImplementations/IO.hs @@ -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 diff --git a/byg/src/FunctionImplementations/Pure.hs b/byg/src/FunctionImplementations/Pure.hs new file mode 100644 index 0000000..cec8d57 --- /dev/null +++ b/byg/src/FunctionImplementations/Pure.hs @@ -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