diff --git a/collects/datalog/eval.rkt b/collects/datalog/eval.rkt index b52537f269..1c5c827c89 100644 --- a/collects/datalog/eval.rkt +++ b/collects/datalog/eval.rkt @@ -1,6 +1,6 @@ #lang racket (require racket/list - (except-in (planet dherman/pprint:4) empty) + "private/pprint.rkt" "ast.rkt" "pretty.rkt" "runtime.rkt") diff --git a/collects/datalog/lang/lang.rkt b/collects/datalog/lang/lang.rkt index 475b7d8065..df045b7672 100644 --- a/collects/datalog/lang/lang.rkt +++ b/collects/datalog/lang/lang.rkt @@ -2,8 +2,7 @@ (require (for-syntax racket/base "../private/compiler.rkt") "../pretty.rkt" - (only-in (planet dherman/pprint:4) - pretty-print)) + "../private/pprint.rkt") (define (print-result value) (if (void? value) diff --git a/collects/datalog/pretty.rkt b/collects/datalog/pretty.rkt index cf1944f55a..92c8120c99 100644 --- a/collects/datalog/pretty.rkt +++ b/collects/datalog/pretty.rkt @@ -1,5 +1,5 @@ #lang racket -(require (planet dherman/pprint:4) +(require "private/pprint.rkt" "ast.rkt") (define (format-datum s) diff --git a/collects/datalog/private/pprint.rkt b/collects/datalog/private/pprint.rkt new file mode 100644 index 0000000000..92924ef70a --- /dev/null +++ b/collects/datalog/private/pprint.rkt @@ -0,0 +1,23 @@ +#lang racket +(provide (all-defined-out)) + +(define (pretty-print s) (display s) (newline)) +(define (pretty-format s) s) + +(define (text s) s) +(define (h-append . ss) (apply string-append ss)) +(define (v-concat/s ss) + (apply string-append (add-between ss "\n"))) +(define (v-concat ss) + (v-concat/s ss)) +(define (apply-infix d ds) + (add-between ds d)) +(define line "\n") +(define comma ",") +(define space " ") +(define lparen "(") +(define rparen ")") +(define dot ".") +(define (nest n d) d) +(define char string) +(define doc? string?) \ No newline at end of file diff --git a/collects/datalog/scribblings/datalog.scrbl b/collects/datalog/scribblings/datalog.scrbl index ccb4885cae..a9bd946dff 100644 --- a/collects/datalog/scribblings/datalog.scrbl +++ b/collects/datalog/scribblings/datalog.scrbl @@ -3,8 +3,7 @@ scribble/eval scribble/basic scribble/bnf - (for-label (planet dherman/pprint:4) - racket/base + (for-label racket/base racket/contract "../main.rkt") "utils.rkt") @@ -26,7 +25,7 @@ on tabling intermediate results ensures that all queries terminate. The easiest way to get started using Datalog for PLT Scheme is with the main module: -@defmodule/this-package[] +@defmodule[datalog] This module provides everything in the entire package. Subsequent sections of this manual describe the functionality of the individual libraries included, which can also be @@ -47,7 +46,6 @@ parent(ebbon, bob). ancestor(A, B)? END ) - (require (planet dherman/pprint)) (pretty-print (format-program (parse-program @@ -68,7 +66,7 @@ the REPL. Datalog is also available as a module language. This can be used by beginning a Datalog source file with the line: -@(racket #,(hash-lang) planet #,(this-package-version-symbol)) +@defmodulelang[datalog] You can omit the PLaneT version numbers if you prefer. Programs without the version number do not need to be updated when this PLaneT package is upgraded. However, it is then the @@ -176,7 +174,7 @@ Unlike Prolog, the order in which clauses are asserted is irrelevant. All querie This library provides the structures that represent Datalog syntax. It can be required via: -@defmodule/this-package[ast] +@defmodule[datalog/ast] @defthing[srcloc/c contract?]{ Contract for the third argument to @racket[datum->syntax]. @@ -327,7 +325,7 @@ This library provides the structures that represent Datalog syntax. It can be re This library provides facilities for parsing Datalog source. It can be required via: -@defmodule/this-package[parse] +@defmodule[datalog/parse] @subsection{Datalog Syntax} @@ -488,7 +486,7 @@ The following BNF describes the syntax of Datalog. This package recognizes an alternative, Scheme-like front-end syntax for Datalog. It can be required via: -@defmodule/this-package[sexp] +@defmodule[datalog/sexp] @subsection{Parenthetical Datalog Syntax} @@ -544,13 +542,7 @@ This package recognizes an alternative, Scheme-like front-end syntax for Datalog This library provides facilities for pretty-printing Datalog source. It can be required via: -@defmodule/this-package[pretty] - -This library depends on the @tt{pprint} PLaneT package, which can be required via: - -@racketblock[(require (planet dherman/pprint:4))] - -See the documentation for @tt{pprint} for information on how to use it. +@defmodule[datalog/pretty] @defproc[(format-datum [d datum/c]) doc?]{ @@ -734,7 +726,7 @@ See the documentation for @tt{pprint} for information on how to use it. This library implements the Datalog runtime system. It can be required via: -@defmodule/this-package[runtime] +@defmodule[datalog/runtime] @defthing[theory/c contract?]{ A contract for @deftech{theories}. @@ -837,7 +829,7 @@ This library implements the Datalog runtime system. It can be required via: This library provides facilities for evaluating Datalog. It can be required via: -@defmodule/this-package[eval] +@defmodule[datalog/eval] @defthing[current-theory (parameter/c mutable-theory/c)]{ The @tech{theory} used by @racket[eval-program] and @racket[eval-stmt]. diff --git a/collects/datalog/tests/pretty.rkt b/collects/datalog/tests/pretty.rkt index 8a3c388eec..5580f7e535 100644 --- a/collects/datalog/tests/pretty.rkt +++ b/collects/datalog/tests/pretty.rkt @@ -1,6 +1,6 @@ #lang racket (require rackunit - (planet dherman/pprint:4) + "../private/pprint.rkt" "../parse.rkt" "../pretty.rkt") (provide pretty-tests) diff --git a/collects/datalog/tool/tool.rkt b/collects/datalog/tool/tool.rkt index 427889ce91..3bdf38f3e4 100644 --- a/collects/datalog/tool/tool.rkt +++ b/collects/datalog/tool/tool.rkt @@ -12,8 +12,7 @@ "../pretty.rkt" "../eval.rkt" "../runtime.rkt" - (only-in (planet dherman/pprint:4) - pretty-print) + "../private/pprint.rkt" (for-template "../lang/lang.rkt")) (provide tool@)