src/wam/ui.lisp @ 15db57524dd3

Fix the interpreter and add a simple UI
author Steve Losh <steve@stevelosh.com>
date Sat, 16 Apr 2016 13:50:36 +0000
parents (none)
children ce87039ad178
(in-package #:bones.wam)


(defparameter *database* nil)

(defmacro with-database (&body body)
  `(let ((*database* (make-wam)))
     ,@body))

(defun add-rule (rule)
  (compile-program *database* rule))

(defmacro rule (&body body)
  `(add-rule ',body))

(defun perform-query (query)
  (run-query *database* query))

(defmacro query (&body body)
  `(perform-query ',body))