move typed requires in helper files

pull/3/head
Matthew Butterick 10 years ago
parent 2737fff0b4
commit 6586d1e8cf

@ -0,0 +1,3 @@
#lang typed/racket/base
;; isolate typed requires in a helper file so the untyped versions can be substituted on the untyped side
(require net/url)

@ -1,9 +1,7 @@
#lang racket/base
(require (for-syntax racket/base racket/syntax) sugar/define net/url)
(require-via-wormhole "../typed/sugar/coerce.rkt")
(provide+safe [->int (any/c . -> . integer?)]
[->string (any/c . -> . string?)]
[->symbol (any/c . -> . symbol?)]
@ -14,7 +12,6 @@
[->vector (any/c . -> . vector?)]
[->boolean (any/c . -> . boolean?)])
;; coercion contracts & *ish predicates
;; only make sense in untyped code
;; thus they are here.

@ -0,0 +1,3 @@
#lang typed/racket/base
;; isolate typed requires in a helper file so the untyped versions can be substituted on the untyped side
(require (only-in racket/list dropf dropf-right))

@ -0,0 +1,3 @@
#lang typed/racket/base
;; isolate typed requires in a helper file so the untyped versions can be substituted on the untyped side
(require typed/net/url)

@ -1,8 +1,7 @@
#lang typed/racket/base
(require (for-syntax typed/racket/base racket/syntax))
(require typed/net/url racket/set racket/sequence)
(require typed/sugar/define)
(require "len.rkt") ; want relative path-spec for bilingual conversion
(require (for-syntax typed/racket/base racket/syntax) sugar/include)
(include-without-lang-line "coerce-helper.rkt")
(require typed/sugar/define racket/set racket/sequence "len.rkt") ; want relative path-spec for bilingual conversion
(define-syntax-rule (make-coercion-error-handler target-format x)
(λ(e) (error (string->symbol (format "->~a" target-format)) (format "Cant convert ~s to ~a" x target-format))))

@ -0,0 +1,4 @@
#lang typed/racket/base
;; isolate typed requires in a helper file so the untyped versions can be substituted on the untyped side
(require/typed racket/list [dropf (All (A) (Listof A) (A -> Boolean) -> (Listof A))]
[dropf-right (All (A) (Listof A) (A -> Boolean) -> (Listof A))])

@ -1,8 +1,7 @@
#lang typed/racket/base
(require (for-syntax racket/base racket/syntax) racket/function)
(require (except-in racket/list flatten dropf dropf-right) typed/sugar/define "coerce.rkt" "len.rkt")
(require/typed racket/list [dropf (All (A) (Listof A) (A -> Boolean) -> (Listof A))]
[dropf-right (All (A) (Listof A) (A -> Boolean) -> (Listof A))])
(require (for-syntax racket/base racket/syntax) racket/function sugar/include)
(require (except-in racket/list dropf dropf-right) typed/sugar/define "coerce.rkt" "len.rkt")
(include-without-lang-line "list-helper.rkt")
;; use fully-qualified paths in require,
;; so they'll work when this file is included elsewhere
(provide (all-defined-out))

Loading…
Cancel
Save