Carp/core/Dynamic.carp
2019-03-13 18:49:48 +01:00

27 lines
575 B
Plaintext

(defmodule Dynamic
;; Functions for doing things at the REPL and during compile time.
(defndynamic inc [x]
(+ x 1))
(defndynamic dec [x]
(- x 1))
(defmodule Project
(doc no-echo "Turn off debug printing in the compiler.")
(defndynamic no-echo []
(do
(Project.config "print-ast" false)
(Project.config "echo-compiler-cmd" false))))
)
;; The following functions are not put into a module for now:
(defndynamic add-cflag [flag]
(Project.config "cflag" flag))
(defndynamic add-lib [lib]
(Project.config "libflag" lib))