diff options
author | Aryadev Chavali <aryadev@aryadevchavali.com> | 2025-02-14 16:11:54 +0000 |
---|---|---|
committer | Aryadev Chavali <aryadev@aryadevchavali.com> | 2025-02-14 16:11:54 +0000 |
commit | 02ff1a3fb3f687160b3164680fd655da56c0eae9 (patch) | |
tree | 0a3b440e7686d75d22d2927b870e0639d4fa926b | |
parent | 4c27e7d5c1bf118d62da28e2be9a0983022190e3 (diff) | |
download | cantedraw-02ff1a3fb3f687160b3164680fd655da56c0eae9.tar.gz cantedraw-02ff1a3fb3f687160b3164680fd655da56c0eae9.tar.bz2 cantedraw-02ff1a3fb3f687160b3164680fd655da56c0eae9.zip |
Prefix all packages with `cantedraw`
This is mostly a sanity check in-case anyone else decides to load this
system for use in their own package - don't want to conflict with
their names.
-rw-r--r-- | cantedraw.asd | 2 | ||||
-rw-r--r-- | lib.functions.lisp | 2 | ||||
-rw-r--r-- | lib.macros.lisp | 10 | ||||
-rw-r--r-- | main.lisp | 6 | ||||
-rw-r--r-- | packages.lisp | 10 |
5 files changed, 16 insertions, 14 deletions
diff --git a/cantedraw.asd b/cantedraw.asd index 37be1d5..ede4524 100644 --- a/cantedraw.asd +++ b/cantedraw.asd @@ -5,7 +5,7 @@ (:file "main")) :build-operation "program-op" :build-pathname "bin/cantedraw" - :entry-point "main:start") + :entry-point "cantedraw.main:start") #+sb-core-compression (defmethod asdf:perform ((o asdf:image-op) (c asdf:system)) diff --git a/lib.functions.lisp b/lib.functions.lisp index 48f50bc..99796c9 100644 --- a/lib.functions.lisp +++ b/lib.functions.lisp @@ -17,7 +17,7 @@ ;;; Code: -(in-package :lib.functions) +(in-package :cantedraw.lib.functions) (fn range (start end &optional (step 1)) (-> (fixnum fixnum &optional fixnum) list) "Make a list of numbers from START to END (exclusive). If STEP is given, then diff --git a/lib.macros.lisp b/lib.macros.lisp index bd1c239..f2435d4 100644 --- a/lib.macros.lisp +++ b/lib.macros.lisp @@ -17,7 +17,7 @@ ;;; Code: -(in-package :lib.macros) +(in-package :cantedraw.lib.macros) (defmacro --> (&rest forms) "Lexically bind current form as `_' for use in the next form, returning the @@ -38,10 +38,12 @@ Also includes transformer where symbols are considered unary functions i.e. nil (let ((assignment-forms (loop :for f :in forms - :for canon-f := (if (symbolp f) (list f 'lib.macros:_) f) - :collect `(lib.macros:_ ,canon-f)))) + :for canon-f := (if (symbolp f) + (list f 'cantedraw.lib.macros:_) + f) + :collect `(cantedraw.lib.macros:_ ,canon-f)))) `(let* ,assignment-forms - lib.macros:_)))) + cantedraw.lib.macros:_)))) (defmacro ->> (&rest forms) "Make current form the last argument of the next form, returning the last @@ -13,12 +13,12 @@ ;;; Commentary: -;; Implementation of `main' package. Defines the entrypoint of the program, -;; handling any input from the user and passing it into the system. +;; Defines the entrypoint of the program, handling any input from the user and +;; passing it into the system. ;;; Code: -(in-package :main) +(in-package :cantedraw.main) (fn read-input (&optional (prompt "> ")) (-> (&optional string) string) (format t "~a" prompt) diff --git a/packages.lisp b/packages.lisp index b2a6760..24de212 100644 --- a/packages.lisp +++ b/packages.lisp @@ -17,7 +17,7 @@ ;;; Code: -(defpackage lib.macros +(defpackage cantedraw.lib.macros (:use :cl) (:export :_ :--> :->> @@ -25,13 +25,13 @@ :while :alist-val :$)) -(defpackage lib.functions - (:use :cl :lib.macros) +(defpackage cantedraw.lib.functions + (:use :cl :cantedraw.lib.macros) (:export :parse-integer* :range :take :split :rev-map)) -(defpackage main - (:use :cl :lib.macros :lib.functions) +(defpackage cantedraw.main + (:use :cl :cantedraw.lib.macros :cantedraw.lib.functions) (:export :start)) |