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.
This commit is contained in:
@@ -5,7 +5,7 @@
|
|||||||
(:file "main"))
|
(:file "main"))
|
||||||
:build-operation "program-op"
|
:build-operation "program-op"
|
||||||
:build-pathname "bin/cantedraw"
|
:build-pathname "bin/cantedraw"
|
||||||
:entry-point "main:start")
|
:entry-point "cantedraw.main:start")
|
||||||
|
|
||||||
#+sb-core-compression
|
#+sb-core-compression
|
||||||
(defmethod asdf:perform ((o asdf:image-op) (c asdf:system))
|
(defmethod asdf:perform ((o asdf:image-op) (c asdf:system))
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
;;; Code:
|
;;; Code:
|
||||||
|
|
||||||
(in-package :lib.functions)
|
(in-package :cantedraw.lib.functions)
|
||||||
|
|
||||||
(fn range (start end &optional (step 1)) (-> (fixnum fixnum &optional fixnum) list)
|
(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
|
"Make a list of numbers from START to END (exclusive). If STEP is given, then
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
;;; Code:
|
;;; Code:
|
||||||
|
|
||||||
(in-package :lib.macros)
|
(in-package :cantedraw.lib.macros)
|
||||||
|
|
||||||
(defmacro --> (&rest forms)
|
(defmacro --> (&rest forms)
|
||||||
"Lexically bind current form as `_' for use in the next form, returning the
|
"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
|
nil
|
||||||
(let ((assignment-forms
|
(let ((assignment-forms
|
||||||
(loop :for f :in forms
|
(loop :for f :in forms
|
||||||
:for canon-f := (if (symbolp f) (list f 'lib.macros:_) f)
|
:for canon-f := (if (symbolp f)
|
||||||
:collect `(lib.macros:_ ,canon-f))))
|
(list f 'cantedraw.lib.macros:_)
|
||||||
|
f)
|
||||||
|
:collect `(cantedraw.lib.macros:_ ,canon-f))))
|
||||||
`(let* ,assignment-forms
|
`(let* ,assignment-forms
|
||||||
lib.macros:_))))
|
cantedraw.lib.macros:_))))
|
||||||
|
|
||||||
(defmacro ->> (&rest forms)
|
(defmacro ->> (&rest forms)
|
||||||
"Make current form the last argument of the next form, returning the last
|
"Make current form the last argument of the next form, returning the last
|
||||||
|
|||||||
@@ -13,12 +13,12 @@
|
|||||||
|
|
||||||
;;; Commentary:
|
;;; Commentary:
|
||||||
|
|
||||||
;; Implementation of `main' package. Defines the entrypoint of the program,
|
;; Defines the entrypoint of the program, handling any input from the user and
|
||||||
;; handling any input from the user and passing it into the system.
|
;; passing it into the system.
|
||||||
|
|
||||||
;;; Code:
|
;;; Code:
|
||||||
|
|
||||||
(in-package :main)
|
(in-package :cantedraw.main)
|
||||||
|
|
||||||
(fn read-input (&optional (prompt "> ")) (-> (&optional string) string)
|
(fn read-input (&optional (prompt "> ")) (-> (&optional string) string)
|
||||||
(format t "~a" prompt)
|
(format t "~a" prompt)
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
;;; Code:
|
;;; Code:
|
||||||
|
|
||||||
(defpackage lib.macros
|
(defpackage cantedraw.lib.macros
|
||||||
(:use :cl)
|
(:use :cl)
|
||||||
(:export
|
(:export
|
||||||
:_ :--> :->>
|
:_ :--> :->>
|
||||||
@@ -25,13 +25,13 @@
|
|||||||
:while :alist-val
|
:while :alist-val
|
||||||
:$))
|
:$))
|
||||||
|
|
||||||
(defpackage lib.functions
|
(defpackage cantedraw.lib.functions
|
||||||
(:use :cl :lib.macros)
|
(:use :cl :cantedraw.lib.macros)
|
||||||
(:export
|
(:export
|
||||||
:parse-integer*
|
:parse-integer*
|
||||||
:range :take :split
|
:range :take :split
|
||||||
:rev-map))
|
:rev-map))
|
||||||
|
|
||||||
(defpackage main
|
(defpackage cantedraw.main
|
||||||
(:use :cl :lib.macros :lib.functions)
|
(:use :cl :cantedraw.lib.macros :cantedraw.lib.functions)
|
||||||
(:export :start))
|
(:export :start))
|
||||||
|
|||||||
Reference in New Issue
Block a user