Add skeletons for function implementations
This commit is contained in:
@@ -5,4 +5,12 @@ module Evaluation.Function
|
||||
import Types (Function(..), Value(..))
|
||||
|
||||
evalFunction :: Function -> Value -> Value
|
||||
evalFunction = undefined
|
||||
evalFunction f x = case (f, x) of
|
||||
(IsImageFilename, String _) ->
|
||||
Bool undefined
|
||||
|
||||
(ConvertedImageFilename, String _) ->
|
||||
String undefined
|
||||
|
||||
_ ->
|
||||
error "unexpected combination of function and argument type"
|
||||
|
||||
@@ -5,4 +5,21 @@ module Evaluation.FunctionIO
|
||||
import Types (FunctionIO(..), Value(..))
|
||||
|
||||
evalFunctionIO :: FunctionIO -> Value -> IO Value
|
||||
evalFunctionIO = undefined
|
||||
evalFunctionIO f x = case (f, x) of
|
||||
(ListDirectory, String _) ->
|
||||
pure $ List undefined
|
||||
|
||||
(ReadTemplate, String _) ->
|
||||
pure $ Template undefined
|
||||
|
||||
(ConvertImage, Tuple (Tuple (String _, String _), ImageConversionSettings _)) ->
|
||||
pure $ Empty
|
||||
|
||||
(SaveFile, Tuple (String _, String _)) ->
|
||||
pure $ Empty
|
||||
|
||||
(RunPandoc, String _) ->
|
||||
pure $ String undefined
|
||||
|
||||
_ ->
|
||||
error "unexpected combination of function and argument type"
|
||||
|
||||
Reference in New Issue
Block a user