racket' -> racket/base' switches in htdp' and 2htdp'.

All of these look safe.  Also, see comment in `2htdp/batch-io' about the
splitting thing (which should probably be revised with the extensions to
`racket/string').
This commit is contained in:
Eli Barzilay 2012-11-06 13:01:01 -05:00
parent 1c8001d174
commit 5aca765989
7 changed files with 38 additions and 17 deletions

View File

@ -1,7 +1,12 @@
#lang racket
#lang racket/base
(require (for-syntax syntax/parse)
srfi/13 htdp/error
(require racket/function
racket/file
racket/string
racket/local
(for-syntax racket/base
syntax/parse)
htdp/error
(rename-in lang/prim (first-order->higher-order f2h))
"private/csv/csv.rkt")
@ -163,10 +168,13 @@
;; split : String [Regexp] -> [Listof String]
;; splits a string into a list of substrings using the given delimiter
;; (white space by default)
;;ELI: This shouldn't be needed now, it can use `string-split' as is
;; (also, the trimming doesn't make sense if the pattern is not a
;; space--?)
(define (split str [ptn #rx"[ ]+"])
(regexp-split ptn (string-trim-both str)))
(regexp-split ptn (string-trim str)))
;; split-lines : String -> Listof[String]
;; splits a string with newlines into a list of lines
(define (split-lines str)
(map string-trim-both (split str "\r*\n")))
(map string-trim (split str "\r*\n")))

View File

@ -1,6 +1,10 @@
#lang racket
#lang racket/base
(require htdp/error)
(require racket/class
racket/list
racket/bool
racket/match
htdp/error)
(provide (all-defined-out))

View File

@ -1,4 +1,4 @@
#lang racket
#lang racket/base
;; ---------------------------------------------------------------------------------------------------
;; provides functions for specifying the shape of big-bang and universe clauses:
@ -12,9 +12,14 @@
->args
contains-clause?)
(require
(for-syntax syntax/parse)
(for-template "clauses-spec-aux.rkt" racket (rename-in lang/prim (first-order->higher-order f2h))))
(require racket/function
racket/list
racket/bool
(only-in racket/unit except) ; used only as a keyword...?
(for-syntax racket/base syntax/parse)
(for-template "clauses-spec-aux.rkt"
racket
(rename-in lang/prim (first-order->higher-order f2h))))
;; ---------------------------------------------------------------------------------------------------
;; specifying the shape of clauses

View File

@ -1,4 +1,4 @@
#lang racket
#lang racket/base
;; ---------------------------------------------------------------------------------------------------
;; provide a mechanism for defining the shape of big-bang and universe clauses
@ -6,7 +6,8 @@
(provide define-keywords DEFAULT)
(require (for-syntax syntax/parse))
(require racket/class
(for-syntax racket/base syntax/parse))
(define-syntax (DEFAULT stx)
(raise-syntax-error 'DEFAULT "used out of context" stx))

View File

@ -1,6 +1,7 @@
#lang racket
#lang racket/base
(require mred/mred mzlib/etc htdp/error)
(require racket/list racket/function racket/gui
mzlib/etc htdp/error)
(provide
;; (launch-many-worlds e1 ... e2)

View File

@ -1,4 +1,6 @@
#lang racket
#lang racket/base
(require racket/contract)
(provide/contract
;; like the unix debugging facility

View File

@ -1,4 +1,4 @@
#lang racket
#lang racket/base
(provide
;; map the directory tree at the given path into a data representation according to model 3 of