diff --git a/byg/byg.cabal b/byg/byg.cabal index 5bdb68b..44453ab 100644 --- a/byg/byg.cabal +++ b/byg/byg.cabal @@ -19,7 +19,8 @@ library exposed-modules: Types Sources - FunctionImplementations + FunctionImplementations.Pure + FunctionImplementations.IO ComputationM Functions build-depends: diff --git a/byg/src/FunctionImplementations.hs b/byg/src/FunctionImplementations.hs deleted file mode 100644 index dfe20cf..0000000 --- a/byg/src/FunctionImplementations.hs +++ /dev/null @@ -1,41 +0,0 @@ -module FunctionImplementations - ( IsImageFilename(..) - , ConvertedImageFilename(..) - , ListDirectory(..) - , OpenImage(..) - , ConvertImage(..) - , SaveFile(..) - , RunPandoc(..) - ) 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 - - -data ListDirectory = ListDirectory deriving (Show) -instance IsFunctionIO ListDirectory FilePath [FilePath] where - runFIO ListDirectory _path = undefined - -data OpenImage = OpenImage deriving (Show) -instance IsFunctionIO OpenImage FilePath Image where - runFIO OpenImage _path = undefined - -data ConvertImage = ConvertImage deriving (Show) -instance IsFunctionIO ConvertImage Image Image where - runFIO ConvertImage _image = 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/Functions.hs b/byg/src/Functions.hs index 5107fdd..9aec2f8 100644 --- a/byg/src/Functions.hs +++ b/byg/src/Functions.hs @@ -9,7 +9,8 @@ module Functions , runPandoc ) where -import FunctionImplementations +import FunctionImplementations.Pure +import FunctionImplementations.IO import ComputationM isImageFilename = runFunction IsImageFilename