title: Executing Parsed function calls in Haskell
body: <p>First i want to say I'm a newbie in Haskell. Here's my problem:
  For a school project I need to be able to parse and interprate and execute a fucntion call. This call needs to be able to execute a function already defined in haskell.<br>
  Parsing the call works, but i have no idea how to execute the function because the amount of arguments and type is unkown. </p>
  
  <p>Here is how i represent my data </p>
  
  <pre><code>type Name = String
  type Cond = Expr
  data Expr
    = Num Int  
    | Boolean Bool
    | BinOp Op Expr Expr
    | Var Name 
    deriving (Eq, Ord, Show)
  data Stmnt 
    = Call Name [Expr]
    | If Cond [Stmnt] [Stmnt]
    | While Cond [Stmnt]
    | VarDef Name Expr
    deriving (Eq, Ord, Show)
  </code></pre>
  
  <p>This is a part of my interpeter. And it is with the implementation of <strong>funcall</strong> that I need help.</p>
  
  <pre><code>data Value = FineInt Int 
             | FineBool Bool
             | FineFun ([Value] -&gt; Value)
  -- The enviroment keeps track of variables in the program          
  type Env = [(Name,Value)]
  -- A state that takes an enviroment
  type StEnv = State Env
  
  evalstm :: Stmnt -&gt; StEnv ()
  evalstm (Call name exprs)  = funcall name exprs
  
  -- funcall name exprs = ?
  </code></pre>