26 lines
589 B
Haskell
26 lines
589 B
Haskell
module Evaluation.Function
|
|
( evalFunction
|
|
) where
|
|
|
|
import Types (Function(..), Value(..))
|
|
|
|
evalFunction :: Function -> Value -> Value
|
|
evalFunction f x = case (f, x) of
|
|
(AppendStrings, Tuple (String _, String _)) ->
|
|
String undefined
|
|
|
|
(JoinPaths, Tuple (String _, String _)) ->
|
|
String undefined
|
|
|
|
(FileComponents, String _) ->
|
|
Tuple (String undefined, String undefined)
|
|
|
|
(IsImageExtension, String _) ->
|
|
Bool undefined
|
|
|
|
(ApplyTemplate, Tuple (Template _, String _)) ->
|
|
String undefined
|
|
|
|
_ ->
|
|
error "unexpected combination of function and argument type"
|