chiark / gitweb /
src/module-impl.lisp: Eliminate `define-fragment'.
[sod] / src / module-impl.lisp
index 1e1f662cefb60e2ead38243553bfc36c911c5083..c15eddaa15f203fd213cdc507c96338b5b9cf68c 100644 (file)
@@ -207,24 +207,6 @@ (defclass code-fragment-item ()
   (:documentation
    "A plain fragment of C to be dropped in at top-level."))
 
   (:documentation
    "A plain fragment of C to be dropped in at top-level."))
 
-(defmacro define-fragment ((reason name) &body things)
-  (categorize (thing things)
-      ((constraints (listp thing))
-       (frags (typep thing '(or string c-fragment))))
-    (when (null frags)
-      (error "Missing code fragment"))
-    (when (cdr frags)
-      (error "Multiple code fragments"))
-    `(add-to-module
-      *module*
-      (make-instance 'code-fragment-item
-                    :fragment ',(car frags)
-                    :name ,name
-                    :reason ,reason
-                    :constraints (list ,@(mapcar (lambda (constraint)
-                                                   (cons 'list constraint))
-                                                 constraints))))))
-
 ;;;--------------------------------------------------------------------------
 ;;; File searching.
 
 ;;;--------------------------------------------------------------------------
 ;;; File searching.