   RETURNS #{info.returns} AS $JAVASCRIPT$
     var mod = require("#{mod.filename}")
     return mod.#{name}(plv8, #{pass_params})
-  $JAVASCRIPT$ LANGUAGE plv8;
+  $JAVASCRIPT$ LANGUAGE plv8 #{immutable};
   ---
   """
 

Module::_compile = (answer, filename) ->
  dir = path.dirname(filename)
  basename = path.basename(filename, '.coffee')
  module = {
    key: "#{dir}/#{basename}"
    filename: filename
    basename: basename
    dir: dir
    exports: {}
  }
  module.code = module_code(module, answer)
  plv8_exports[currentModule] = module
  res = oldcompile.apply(this, arguments)

  params = (x.join(" ") for x in info.params).join(', ')
  pass_params = (x for [x,_] in info.params).join(', ')
  declaration = "#{mod.schema}.#{name}(#{params})"
  immutable = (info.immutable && 'IMMUTABLE') || ''

  """
  ---
