Carp/test/test-for-errors/def-.carp
Tim Dévé 19c1a4c557
feat: Adds defn- and def- macros (#1174)
* refactor: Groups Dynamic together in Macros.carp

* fix: Fixes doc for `hidden` referring to the wrong symbol

* feat: Adds defn- & def- macros

Adding these macros as a shortand for declaring a def or defn and making
them `hidden` and `private`, useful to keep things internal to a module.

* test: Adds expected error output tests for def- & defn-

* refactor: Changes position of Module and Interface section in LanguageGuide

Trying to introduce concepts in the same order they are referred to in
the examples: structs > modules > interfaces.

* docs: Adds private & hidden section in the LanguageGuide
2021-03-03 08:57:36 +01:00

8 lines
169 B
Plaintext

(Project.config "file-path-print-length" "short")
(defmodule Say
(def- hell @"hell")
(def hello (String.concat &[@&hell @"o"])))
(defn main [] (println* &Say.hell))