Add ApplyTemplate and use NoToken less

This commit is contained in:
2024-09-24 23:01:07 +02:00
parent 8bf1e107a0
commit f4ff6d6d98
5 changed files with 41 additions and 19 deletions

View File

@@ -6,11 +6,17 @@ import Types (Function(..), Value(..))
evalFunction :: Function -> Value -> Value
evalFunction f x = case (f, x) of
(JoinPaths, Tuple (String _, String _)) ->
String undefined
(IsImageFilename, String _) ->
Bool undefined
(ConvertedImageFilename, String _) ->
String undefined
(ApplyTemplate, Tuple (Template _, String _)) ->
String undefined
_ ->
error "unexpected combination of function and argument type"

View File

@@ -21,8 +21,8 @@ evalFunctionIO f x = case (f, x) of
(MakeDir, String _) ->
pure $ Empty
(RunPandoc, Tuple (String _, String _)) ->
pure $ Empty
(RunPandoc, String _) ->
pure $ String undefined
_ ->
error "unexpected combination of function and argument type"