mirror of
https://github.com/carp-lang/Carp.git
synced 2024-09-19 09:28:10 +03:00
27 lines
575 B
Plaintext
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))
|