Fixed issues caused by splitting library.
This commit is contained in:
parent
a91cc950cd
commit
eb0942a816
|
@ -201,15 +201,11 @@ Library functions and utilities
|
||||||
|
|
||||||
Utilities that complement racket and typed/racket's standard libraries.
|
Utilities that complement racket and typed/racket's standard libraries.
|
||||||
|
|
||||||
* `lib/low.rkt`
|
* `lib/low.rkt` and `lib/low/*.rkt`
|
||||||
|
|
||||||
Lower-level utilities that complement racket and typed/racket's standard
|
Lower-level utilities that complement racket and typed/racket's standard
|
||||||
libraries.
|
libraries.
|
||||||
|
|
||||||
* `lib/low-untyped.rkt`
|
|
||||||
|
|
||||||
Wrapper around `lib/low.rkt` that allows using it from a untyped racket file.
|
|
||||||
|
|
||||||
* `lib/untyped/for-star-list-star.rkt`
|
* `lib/untyped/for-star-list-star.rkt`
|
||||||
|
|
||||||
A utility macro similar to `for*/list` to iterate over collections and return
|
A utility macro similar to `for*/list` to iterate over collections and return
|
||||||
|
@ -218,7 +214,8 @@ Library functions and utilities
|
||||||
|
|
||||||
* `lib/untyped.rkt`
|
* `lib/untyped.rkt`
|
||||||
|
|
||||||
Aggregates `lib/low-untyped.rkt`, and `lib/untyped/for-star-list-star.rkt`.
|
Aggregates `(submod "lib/low.rkt" untyped)`, and
|
||||||
|
`lib/untyped/for-star-list-star.rkt`.
|
||||||
|
|
||||||
* `lib/test-framework.rkt`
|
* `lib/test-framework.rkt`
|
||||||
|
|
||||||
|
|
|
@ -11,16 +11,15 @@
|
||||||
|
|
||||||
|
|
||||||
(require "get.lp2.rkt"
|
(require "get.lp2.rkt"
|
||||||
"../lib/low-untyped.rkt"
|
(submod "../lib/low.rkt" untyped)
|
||||||
(for-syntax racket/string
|
(for-syntax racket/string
|
||||||
syntax/parse
|
syntax/parse
|
||||||
racket/syntax
|
racket/syntax
|
||||||
syntax/stx
|
|
||||||
syntax/strip-context
|
syntax/strip-context
|
||||||
racket/struct
|
racket/struct
|
||||||
racket/function
|
racket/function
|
||||||
syntax/srcloc
|
syntax/srcloc
|
||||||
"../lib/low-untyped.rkt"))
|
(submod "../lib/low.rkt" untyped)))
|
||||||
|
|
||||||
#|
|
#|
|
||||||
(define-syntax/parse (dot x:id)
|
(define-syntax/parse (dot x:id)
|
||||||
|
|
|
@ -226,7 +226,7 @@ position in the vector equal to the index associated to it in the hash table:
|
||||||
(require (for-syntax syntax/parse
|
(require (for-syntax syntax/parse
|
||||||
syntax/parse/experimental/template
|
syntax/parse/experimental/template
|
||||||
racket/syntax
|
racket/syntax
|
||||||
"../lib/low-untyped.rkt")
|
(submod "../lib/low.rkt" untyped))
|
||||||
"../lib/low.rkt"
|
"../lib/low.rkt"
|
||||||
"../type-expander/type-expander.lp2.rkt")
|
"../type-expander/type-expander.lp2.rkt")
|
||||||
|
|
||||||
|
|
|
@ -201,7 +201,7 @@ The type for the function generated by @tc[λget] mirrors the cases from
|
||||||
(module main typed/racket
|
(module main typed/racket
|
||||||
(require (for-syntax syntax/parse
|
(require (for-syntax syntax/parse
|
||||||
racket/syntax
|
racket/syntax
|
||||||
"../lib/low-untyped.rkt")
|
(submod "../lib/low.rkt" untyped))
|
||||||
"../lib/low.rkt"
|
"../lib/low.rkt"
|
||||||
"structure.lp2.rkt"
|
"structure.lp2.rkt"
|
||||||
"variant.lp2.rkt"
|
"variant.lp2.rkt"
|
||||||
|
|
|
@ -150,9 +150,7 @@ name) with the right type, so that the user doesn't see all the types in the
|
||||||
(require (for-syntax syntax/parse
|
(require (for-syntax syntax/parse
|
||||||
syntax/parse/experimental/template
|
syntax/parse/experimental/template
|
||||||
racket/syntax
|
racket/syntax
|
||||||
syntax/stx
|
(submod "../lib/low.rkt" untyped))
|
||||||
"../lib/low-untyped.rkt"
|
|
||||||
"../lib/low/multiassoc-syntax.rkt")
|
|
||||||
"../lib/low.rkt"
|
"../lib/low.rkt"
|
||||||
"graph.lp2.rkt"
|
"graph.lp2.rkt"
|
||||||
"get.lp2.rkt"
|
"get.lp2.rkt"
|
||||||
|
|
|
@ -162,11 +162,8 @@ encapsulating the result types of mappings.
|
||||||
(require (for-syntax syntax/parse
|
(require (for-syntax syntax/parse
|
||||||
syntax/parse/experimental/template
|
syntax/parse/experimental/template
|
||||||
racket/syntax
|
racket/syntax
|
||||||
syntax/stx
|
(submod "../lib/low.rkt" untyped)
|
||||||
"../lib/low-untyped.rkt"
|
"rewrite-type.lp2.rkt" #|debug|#)
|
||||||
"../lib/low/multiassoc-syntax.rkt"
|
|
||||||
"rewrite-type.lp2.rkt"; debug
|
|
||||||
)
|
|
||||||
(rename-in "../lib/low.rkt" [~> threading:~>])
|
(rename-in "../lib/low.rkt" [~> threading:~>])
|
||||||
"graph.lp2.rkt"
|
"graph.lp2.rkt"
|
||||||
"get.lp2.rkt"
|
"get.lp2.rkt"
|
||||||
|
|
|
@ -761,12 +761,11 @@ We will be able to use this type expander in function types, for example:
|
||||||
(module main typed/racket
|
(module main typed/racket
|
||||||
(require (for-syntax syntax/parse
|
(require (for-syntax syntax/parse
|
||||||
racket/syntax
|
racket/syntax
|
||||||
syntax/stx
|
|
||||||
syntax/parse/experimental/template
|
syntax/parse/experimental/template
|
||||||
racket/sequence
|
racket/sequence
|
||||||
racket/pretty
|
racket/pretty
|
||||||
"rewrite-type.lp2.rkt"
|
"rewrite-type.lp2.rkt"
|
||||||
"../lib/low-untyped.rkt"
|
(submod "../lib/low.rkt" untyped)
|
||||||
"meta-struct.rkt")
|
"meta-struct.rkt")
|
||||||
racket/splicing
|
racket/splicing
|
||||||
"fold-queues.lp2.rkt"
|
"fold-queues.lp2.rkt"
|
||||||
|
|
|
@ -840,9 +840,8 @@ checker, unless it is absorbed by a larger type, like in
|
||||||
syntax/parse/experimental/template
|
syntax/parse/experimental/template
|
||||||
racket/syntax
|
racket/syntax
|
||||||
racket/function
|
racket/function
|
||||||
syntax/stx
|
|
||||||
racket/pretty
|
racket/pretty
|
||||||
"../lib/low-untyped.rkt"
|
(submod "../lib/low.rkt" untyped)
|
||||||
"../lib/untyped.rkt")
|
"../lib/untyped.rkt")
|
||||||
(prefix-in DEBUG-tr: typed/racket)
|
(prefix-in DEBUG-tr: typed/racket)
|
||||||
syntax/parse
|
syntax/parse
|
||||||
|
|
|
@ -2,9 +2,8 @@
|
||||||
|
|
||||||
(require (for-syntax racket/syntax
|
(require (for-syntax racket/syntax
|
||||||
racket/function
|
racket/function
|
||||||
syntax/stx
|
|
||||||
syntax/parse
|
syntax/parse
|
||||||
"../lib/low-untyped.rkt")
|
(submod "../lib/low.rkt" untyped))
|
||||||
"../lib/low.rkt"
|
"../lib/low.rkt"
|
||||||
"get.lp2.rkt"
|
"get.lp2.rkt"
|
||||||
"../type-expander/type-expander.lp2.rkt")
|
"../type-expander/type-expander.lp2.rkt")
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#lang typed/racket
|
#lang typed/racket
|
||||||
|
|
||||||
(require (for-syntax syntax/parse
|
(require (for-syntax syntax/parse
|
||||||
"../lib/low-untyped.rkt")
|
(submod "../lib/low.rkt" untyped))
|
||||||
"../type-expander/type-expander.lp2.rkt")
|
"../type-expander/type-expander.lp2.rkt")
|
||||||
|
|
||||||
(provide curry-map)
|
(provide curry-map)
|
||||||
|
|
|
@ -1,10 +1,9 @@
|
||||||
#lang typed/racket
|
#lang typed/racket
|
||||||
|
|
||||||
(require (for-syntax racket/syntax
|
(require (for-syntax racket/syntax
|
||||||
syntax/stx
|
|
||||||
syntax/parse
|
syntax/parse
|
||||||
syntax/parse/experimental/template
|
syntax/parse/experimental/template
|
||||||
"../lib/low-untyped.rkt")
|
(submod "../lib/low.rkt" untyped))
|
||||||
"../lib/low.rkt"
|
"../lib/low.rkt"
|
||||||
"get.lp2.rkt"
|
"get.lp2.rkt"
|
||||||
"../type-expander/type-expander.lp2.rkt")
|
"../type-expander/type-expander.lp2.rkt")
|
||||||
|
|
|
@ -1,10 +1,9 @@
|
||||||
#lang debug typed/racket
|
#lang debug typed/racket
|
||||||
|
|
||||||
(require (for-syntax racket/syntax
|
(require (for-syntax racket/syntax
|
||||||
syntax/stx
|
|
||||||
syntax/parse
|
syntax/parse
|
||||||
syntax/parse/experimental/template
|
syntax/parse/experimental/template
|
||||||
"../lib/low-untyped.rkt")
|
(submod "../lib/low.rkt" untyped))
|
||||||
(for-meta 2
|
(for-meta 2
|
||||||
racket/base
|
racket/base
|
||||||
racket/syntax)
|
racket/syntax)
|
||||||
|
|
|
@ -375,7 +375,7 @@ was a tag requested.
|
||||||
(module main typed/racket
|
(module main typed/racket
|
||||||
(require (for-syntax syntax/parse
|
(require (for-syntax syntax/parse
|
||||||
racket/syntax
|
racket/syntax
|
||||||
"../lib/low-untyped.rkt")
|
(submod "../lib/low.rkt" untyped))
|
||||||
"../lib/low.rkt"
|
"../lib/low.rkt"
|
||||||
racket/set
|
racket/set
|
||||||
racket/format)
|
racket/format)
|
||||||
|
|
|
@ -630,11 +630,10 @@ These metafunctions just extract the arguments for @tc[replace-in-type] and
|
||||||
(require
|
(require
|
||||||
(for-syntax syntax/parse
|
(for-syntax syntax/parse
|
||||||
racket/syntax
|
racket/syntax
|
||||||
syntax/stx
|
|
||||||
racket/format
|
racket/format
|
||||||
syntax/parse/experimental/template
|
syntax/parse/experimental/template
|
||||||
racket/sequence
|
racket/sequence
|
||||||
"../lib/low-untyped.rkt"
|
(submod "../lib/low.rkt" untyped)
|
||||||
(only-in "../type-expander/type-expander.lp2.rkt"
|
(only-in "../type-expander/type-expander.lp2.rkt"
|
||||||
expand-type)
|
expand-type)
|
||||||
"meta-struct.rkt")
|
"meta-struct.rkt")
|
||||||
|
|
|
@ -591,12 +591,10 @@ chances that we could write a definition for that identifier.
|
||||||
syntax/parse/experimental/template
|
syntax/parse/experimental/template
|
||||||
mzlib/etc
|
mzlib/etc
|
||||||
racket/struct-info
|
racket/struct-info
|
||||||
syntax/stx
|
|
||||||
racket/sequence
|
racket/sequence
|
||||||
;; in-syntax on older versions:
|
;; in-syntax on older versions:
|
||||||
;;;unstable/sequence
|
;;;unstable/sequence
|
||||||
"../lib/low-untyped.rkt"
|
(submod "../lib/low.rkt" untyped)
|
||||||
"../lib/low/multiassoc-syntax.rkt"
|
|
||||||
"meta-struct.rkt")
|
"meta-struct.rkt")
|
||||||
"../lib/low.rkt"
|
"../lib/low.rkt"
|
||||||
"../type-expander/type-expander.lp2.rkt"
|
"../type-expander/type-expander.lp2.rkt"
|
||||||
|
|
|
@ -281,7 +281,7 @@ number of name collisions.
|
||||||
(require (for-syntax syntax/parse
|
(require (for-syntax syntax/parse
|
||||||
syntax/parse/experimental/template
|
syntax/parse/experimental/template
|
||||||
racket/syntax
|
racket/syntax
|
||||||
"../lib/low-untyped.rkt")
|
(submod "../lib/low.rkt" untyped))
|
||||||
"../lib/low.rkt"
|
"../lib/low.rkt"
|
||||||
"../type-expander/multi-id.lp2.rkt"
|
"../type-expander/multi-id.lp2.rkt"
|
||||||
"../type-expander/type-expander.lp2.rkt"
|
"../type-expander/type-expander.lp2.rkt"
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
(require scriblib/render-cond)
|
(require scriblib/render-cond)
|
||||||
|
|
||||||
;(require "low-untyped.rkt")
|
;(require "(submod low.rkt untyped)")
|
||||||
;(#lang reader "scribble-custom/lp2.rkt" #:lang typed/racket)
|
;(#lang reader "scribble-custom/lp2.rkt" #:lang typed/racket)
|
||||||
|
|
||||||
;; http://lists.racket-lang.org/users/archive/2015-January/065752.html
|
;; http://lists.racket-lang.org/users/archive/2015-January/065752.html
|
||||||
|
|
|
@ -50,8 +50,8 @@ scribble, see
|
||||||
(module main typed/racket
|
(module main typed/racket
|
||||||
(require (for-syntax syntax/parse
|
(require (for-syntax syntax/parse
|
||||||
racket/syntax
|
racket/syntax
|
||||||
"../../lib/low-untyped.rkt")
|
(submod "../../lib/low.rkt" untyped))
|
||||||
"../../lib/low-untyped.rkt")
|
(submod "../../lib/low.rkt" untyped))
|
||||||
(provide foo)
|
(provide foo)
|
||||||
|
|
||||||
<foo>
|
<foo>
|
||||||
|
|
|
@ -1,30 +1,31 @@
|
||||||
#lang typed/racket
|
#lang typed/racket
|
||||||
(require "low2/typed-untyped.rkt")
|
(require "low/typed-untyped.rkt")
|
||||||
(define-typed/untyped-modules #:no-test
|
(define-typed/untyped-modules #:no-test
|
||||||
(require "low2/typed-untyped.rkt")
|
(require "low/typed-untyped.rkt")
|
||||||
(provide (all-from-out "low2/typed-untyped.rkt"))
|
(provide (all-from-out "low/typed-untyped.rkt"))
|
||||||
|
|
||||||
;(require/provide (typed/untyped "low2/fixnum.rkt" …))
|
;(require/provide (typed/untyped "low/fixnum.rkt" …))
|
||||||
(require/provide-typed/untyped
|
(require/provide-typed/untyped
|
||||||
"low2/fixnum.rkt"
|
"low/misc.rkt"
|
||||||
"low2/typed-rackunit.rkt"
|
"low/require-provide.rkt"
|
||||||
"low2/typed-rackunit-extensions.rkt"
|
"low/fixnum.rkt"
|
||||||
"low2/syntax-parse.rkt"
|
"low/typed-rackunit.rkt"
|
||||||
"low2/threading.rkt"
|
"low/typed-rackunit-extensions.rkt"
|
||||||
"low2/aliases.rkt"
|
"low/syntax-parse.rkt"
|
||||||
"low2/sequence.rkt"
|
"low/threading.rkt"
|
||||||
"low2/repeat-stx.rkt"
|
"low/aliases.rkt"
|
||||||
"low2/stx.rkt"
|
"low/sequence.rkt"
|
||||||
"low2/list.rkt"
|
"low/repeat-stx.rkt"
|
||||||
"low2/ids.rkt"
|
"low/stx.rkt"
|
||||||
"low2/generate-indices.rkt"
|
"low/list.rkt"
|
||||||
"low2/set.rkt"
|
"low/values.rkt"
|
||||||
"low2/type-inference-helpers.rkt"
|
"low/ids.rkt"
|
||||||
"low2/percent.rkt"
|
"low/generate-indices.rkt"
|
||||||
"low2/not-implemented-yet.rkt"
|
"low/set.rkt"
|
||||||
"low2/cond-let.rkt"
|
"low/type-inference-helpers.rkt"
|
||||||
|
"low/percent.rkt"
|
||||||
|
"low/not-implemented-yet.rkt"
|
||||||
|
"low/cond-let.rkt"
|
||||||
"low/multiassoc-syntax.rkt"
|
"low/multiassoc-syntax.rkt"
|
||||||
"low/tmpl-multiassoc-syntax.rkt"
|
"low/tmpl-multiassoc-syntax.rkt"
|
||||||
"low/logn-id.rkt"))
|
"low/logn-id.rkt"))
|
||||||
|
|
||||||
(require 'typed)
|
|
|
@ -1,7 +1,16 @@
|
||||||
#lang typed/racket
|
#lang typed/racket
|
||||||
(require "typed-untyped.rkt")
|
(require "typed-untyped.rkt")
|
||||||
(define-typed/untyped-modules #:no-test
|
(define-typed/untyped-modules #:no-test
|
||||||
(provide ∘ … …+)
|
(provide (all-from-out racket/match)
|
||||||
|
∘
|
||||||
|
…
|
||||||
|
…+
|
||||||
|
match-λ
|
||||||
|
match-λ*
|
||||||
|
match-λ**
|
||||||
|
generate-temporary)
|
||||||
|
|
||||||
|
(require racket/match)
|
||||||
|
|
||||||
(require (only-in racket
|
(require (only-in racket
|
||||||
[compose ∘]
|
[compose ∘]
|
||||||
|
@ -9,9 +18,8 @@
|
||||||
(only-in syntax/parse
|
(only-in syntax/parse
|
||||||
[...+ …+]))
|
[...+ …+]))
|
||||||
|
|
||||||
(require racket/match)
|
(require (only-in racket/match
|
||||||
(provide (all-from-out racket/match)
|
[match-lambda match-λ]
|
||||||
(rename-out [match-lambda match-λ]
|
|
||||||
[match-lambda* match-λ*]
|
[match-lambda* match-λ*]
|
||||||
[match-lambda** match-λ**]))
|
[match-lambda** match-λ**]))
|
||||||
|
|
||||||
|
|
|
@ -10,9 +10,10 @@
|
||||||
define-temp-ids)
|
define-temp-ids)
|
||||||
|
|
||||||
(require "typed-untyped.rkt")
|
(require "typed-untyped.rkt")
|
||||||
(require-typed/untyped "sequence.rkt")
|
(require-typed/untyped "sequence.rkt"
|
||||||
|
"aliases.rkt")
|
||||||
|
(begin-for-syntax (require "typed-untyped.rkt")
|
||||||
|
(require-typed/untyped "aliases.rkt"))
|
||||||
|
|
||||||
(module m-!temp racket
|
(module m-!temp racket
|
||||||
(provide !temp)
|
(provide !temp)
|
||||||
|
@ -34,8 +35,7 @@
|
||||||
|
|
||||||
(require/typed racket/syntax
|
(require/typed racket/syntax
|
||||||
[format-id (→ Syntax String (U String Identifier) *
|
[format-id (→ Syntax String (U String Identifier) *
|
||||||
Identifier)]
|
Identifier)])
|
||||||
[(generate-temporary generate-temporary2) (→ Any Identifier)])
|
|
||||||
(require (only-in racket/syntax define/with-syntax)
|
(require (only-in racket/syntax define/with-syntax)
|
||||||
(only-in syntax/stx stx-map)
|
(only-in syntax/stx stx-map)
|
||||||
(for-syntax racket/base
|
(for-syntax racket/base
|
||||||
|
|
|
@ -1,13 +1,14 @@
|
||||||
#lang typed/racket
|
#lang typed/racket
|
||||||
(require "../low2/typed-untyped.rkt")
|
(require "typed-untyped.rkt")
|
||||||
(define-typed/untyped-modules #:no-test
|
(define-typed/untyped-modules #:no-test
|
||||||
|
(provide define-logn-ids)
|
||||||
|
|
||||||
(require (for-syntax syntax/parse
|
(require (for-syntax syntax/parse
|
||||||
racket/syntax
|
racket/syntax
|
||||||
racket/function
|
racket/function
|
||||||
racket/match
|
racket/match
|
||||||
syntax/stx))
|
syntax/stx)
|
||||||
|
"typed-untyped.rkt")
|
||||||
(provide define-logn-ids)
|
|
||||||
|
|
||||||
(begin-for-syntax
|
(begin-for-syntax
|
||||||
(define (insert make-node v ts)
|
(define (insert make-node v ts)
|
||||||
|
@ -53,7 +54,8 @@
|
||||||
(define (make-btd bt)
|
(define (make-btd bt)
|
||||||
(match bt
|
(match bt
|
||||||
[`(node ,s ,(and a `(,_ ,sa . ,_)) ,b)
|
[`(node ,s ,(and a `(,_ ,sa . ,_)) ,b)
|
||||||
#`(if ((make-predicate #,sa) v-cache)
|
#`(if (if-typed ((make-predicate #,sa) v-cache)
|
||||||
|
#,(format-id sa "~a?" sa))
|
||||||
#,(make-btd a)
|
#,(make-btd a)
|
||||||
#,(make-btd b))]
|
#,(make-btd b))]
|
||||||
[`(leaf ,s ,a ,t ,tmp)
|
[`(leaf ,s ,a ,t ,tmp)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#lang typed/racket
|
#lang typed/racket
|
||||||
(require "typed-untyped.rkt")
|
(require "typed-untyped.rkt")
|
||||||
(define-typed/untyped-modules
|
(define-typed/untyped-modules #:no-test
|
||||||
(provide hash-set**
|
(provide hash-set**
|
||||||
;string-set!
|
;string-set!
|
||||||
;string-copy!
|
;string-copy!
|
||||||
|
|
|
@ -1,9 +0,0 @@
|
||||||
#lang racket
|
|
||||||
|
|
||||||
(begin-for-syntax
|
|
||||||
(define partially-defined-module++ (make-hash
|
|
||||||
|
|
||||||
(define-syntax (module++ stx)
|
|
||||||
(syntax-case stx
|
|
||||||
[(_ name lang . body)
|
|
||||||
(syntax-local-lift-module-end-declaration #'define-module )
|
|
|
@ -1,13 +1,13 @@
|
||||||
#lang typed/racket
|
#lang typed/racket
|
||||||
(require "../low2/typed-untyped.rkt")
|
(require "typed-untyped.rkt")
|
||||||
(define-typed/untyped-modules #:no-test
|
(define-typed/untyped-modules #:no-test
|
||||||
(provide multiassoc-syntax
|
(provide multiassoc-syntax
|
||||||
cdr-assoc-syntax
|
cdr-assoc-syntax
|
||||||
assoc-syntax)
|
assoc-syntax)
|
||||||
|
|
||||||
(require "../low2/typed-untyped.rkt")
|
(require "typed-untyped.rkt")
|
||||||
(require-typed/untyped "../low2/aliases.rkt"
|
(require-typed/untyped "aliases.rkt"
|
||||||
"../low2/stx.rkt")
|
"stx.rkt")
|
||||||
|
|
||||||
;; TODO: cdr-stx-assoc is already defined in lib/low.rkt
|
;; TODO: cdr-stx-assoc is already defined in lib/low.rkt
|
||||||
|
|
||||||
|
|
|
@ -31,11 +31,14 @@
|
||||||
|
|
||||||
check-duplicate-identifiers
|
check-duplicate-identifiers
|
||||||
|
|
||||||
nameof)
|
nameof
|
||||||
|
(all-from-out syntax/stx))
|
||||||
|
|
||||||
(require "typed-untyped.rkt")
|
(require "typed-untyped.rkt")
|
||||||
(require-typed/untyped "sequence.rkt")
|
(require-typed/untyped "sequence.rkt")
|
||||||
|
|
||||||
|
(require syntax/stx)
|
||||||
|
|
||||||
;; match-expanders:
|
;; match-expanders:
|
||||||
;; stx-list
|
;; stx-list
|
||||||
;; stx-e
|
;; stx-e
|
||||||
|
@ -150,14 +153,26 @@
|
||||||
|
|
||||||
(: stx-null? (→ Any Boolean : (U (Syntaxof Null) Null)))
|
(: stx-null? (→ Any Boolean : (U (Syntaxof Null) Null)))
|
||||||
(define (stx-null? v)
|
(define (stx-null? v)
|
||||||
((make-predicate (U (Syntaxof Null) Null)) v))
|
(if-typed
|
||||||
|
((make-predicate (U (Syntaxof Null) Null)) v)
|
||||||
|
(or (null? v) (and (syntax? v) (null? (syntax-e v))))))
|
||||||
|
|
||||||
|
(module+ test
|
||||||
|
(check-equal? (stx-null? #f) #f)
|
||||||
|
(check-equal? (stx-null? 'a) #f)
|
||||||
|
(check-equal? (stx-null? '()) #t)
|
||||||
|
(check-equal? (stx-null? #'()) #t)
|
||||||
|
(check-equal? (stx-null? #''()) #f)
|
||||||
|
(check-equal? (stx-null? #'a) #f))
|
||||||
|
|
||||||
(: stx-pair? (→ Any Boolean : (U (Pairof Any Any)
|
(: stx-pair? (→ Any Boolean : (U (Pairof Any Any)
|
||||||
(Syntaxof (Pairof Any Any)))))
|
(Syntaxof (Pairof Any Any)))))
|
||||||
(define (stx-pair? v)
|
(define (stx-pair? v)
|
||||||
|
(if-typed
|
||||||
((make-predicate (U (Pairof Any Any)
|
((make-predicate (U (Pairof Any Any)
|
||||||
(Syntaxof (Pairof Any Any))))
|
(Syntaxof (Pairof Any Any))))
|
||||||
v)))
|
v)
|
||||||
|
(or (pair? v) (and (syntax? v) (pair? (syntax-e v)))))))
|
||||||
|
|
||||||
;; constructors:
|
;; constructors:
|
||||||
;; stx-cons
|
;; stx-cons
|
||||||
|
@ -267,7 +282,7 @@
|
||||||
[else
|
[else
|
||||||
(stx-drop-last (syntax-e l))])
|
(stx-drop-last (syntax-e l))])
|
||||||
|
|
||||||
#;(if ((make-predicate (Syntaxof Any)) l)
|
#;(if (if-typed ((make-predicate (Syntaxof Any)) l) (syntax? l))
|
||||||
(stx-drop-last (syntax-e l))
|
(stx-drop-last (syntax-e l))
|
||||||
(if (null? l)
|
(if (null? l)
|
||||||
#'()
|
#'()
|
||||||
|
|
|
@ -1,18 +1,17 @@
|
||||||
#lang typed/racket
|
#lang typed/racket
|
||||||
(require "../low2/typed-untyped.rkt")
|
(require "typed-untyped.rkt")
|
||||||
(define-typed/untyped-modules #:no-test
|
(define-typed/untyped-modules #:no-test
|
||||||
(provide tmpl-cdr-assoc-syntax
|
(provide tmpl-cdr-assoc-syntax
|
||||||
(rename-out [tmpl-cdr-assoc-syntax !cdr-assoc]))
|
(rename-out [tmpl-cdr-assoc-syntax !cdr-assoc]))
|
||||||
|
|
||||||
(require "../low2/typed-untyped.rkt")
|
|
||||||
|
|
||||||
(module m-tmpl-cdr-assoc-syntax racket
|
(module m-tmpl-cdr-assoc-syntax racket
|
||||||
(provide tmpl-cdr-assoc-syntax)
|
(provide tmpl-cdr-assoc-syntax)
|
||||||
|
|
||||||
(require syntax/parse
|
(require syntax/parse
|
||||||
syntax/parse/experimental/template
|
syntax/parse/experimental/template
|
||||||
(submod "../low2/stx.rkt" untyped)
|
(submod "stx.rkt" untyped)
|
||||||
(submod "multiassoc-syntax.rkt" untyped))
|
(submod "multiassoc-syntax.rkt" untyped)
|
||||||
|
(submod "aliases.rkt" untyped))
|
||||||
|
|
||||||
(define-template-metafunction (tmpl-cdr-assoc-syntax stx)
|
(define-template-metafunction (tmpl-cdr-assoc-syntax stx)
|
||||||
(syntax-parse stx
|
(syntax-parse stx
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#lang racket
|
#lang racket
|
||||||
(require "low-untyped.rkt")
|
(require (submod "low.rkt" untyped))
|
||||||
|
|
||||||
(with-syntax ([((foo ...) ...) #'((aa bb cc) (x1 x2))])
|
(with-syntax ([((foo ...) ...) #'((aa bb cc) (x1 x2))])
|
||||||
(define-temp-ids "___~a.truc" ((foo ...) ...) #:first-base fst)
|
(define-temp-ids "___~a.truc" ((foo ...) ...) #:first-base fst)
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#lang typed/racket
|
#lang typed/racket
|
||||||
|
|
||||||
(require "low-untyped.rkt")
|
(require "low.rkt")
|
||||||
(require/provide "untyped/for-star-list-star.rkt")
|
(require/provide "untyped/for-star-list-star.rkt")
|
||||||
|
|
|
@ -119,7 +119,6 @@
|
||||||
|
|
||||||
(define (tag-pair dep)
|
(define (tag-pair dep)
|
||||||
(append (if (equal? (cdr dep) "lib/low.rkt") '(lib/low) '())
|
(append (if (equal? (cdr dep) "lib/low.rkt") '(lib/low) '())
|
||||||
(if (equal? (cdr dep) "lib/low-untyped.rkt") '(lib/low) '())
|
|
||||||
(if (equal? (categorize-main-module (car dep))
|
(if (equal? (categorize-main-module (car dep))
|
||||||
(categorize-main-module (cdr dep))) '(submodule) '())
|
(categorize-main-module (cdr dep))) '(submodule) '())
|
||||||
(if (lib? (cdr dep)) '(lib) '())))
|
(if (lib? (cdr dep)) '(lib) '())))
|
||||||
|
|
|
@ -137,6 +137,7 @@
|
||||||
|
|
||||||
(run! `(,(find-executable-path-or-fail "raco")
|
(run! `(,(find-executable-path-or-fail "raco")
|
||||||
"make"
|
"make"
|
||||||
|
"-v"
|
||||||
"-j" "5"
|
"-j" "5"
|
||||||
,@rkt-files))
|
,@rkt-files))
|
||||||
|
|
||||||
|
|
|
@ -1069,10 +1069,9 @@ in a separate module (that will be used only by macros, so it will be written in
|
||||||
(module expander racket
|
(module expander racket
|
||||||
(require racket
|
(require racket
|
||||||
syntax/parse
|
syntax/parse
|
||||||
syntax/stx
|
|
||||||
racket/format
|
racket/format
|
||||||
syntax/id-table
|
syntax/id-table
|
||||||
"../lib/low-untyped.rkt")
|
(submod "../lib/low.rkt" untyped))
|
||||||
|
|
||||||
(require (for-template typed/racket))
|
(require (for-template typed/racket))
|
||||||
|
|
||||||
|
@ -1101,7 +1100,7 @@ We can finally define the overloaded forms, as well as the extra
|
||||||
racket/syntax
|
racket/syntax
|
||||||
syntax/parse
|
syntax/parse
|
||||||
syntax/parse/experimental/template
|
syntax/parse/experimental/template
|
||||||
"../lib/low-untyped.rkt")
|
(submod "../lib/low.rkt" untyped))
|
||||||
"../lib/low.rkt")
|
"../lib/low.rkt")
|
||||||
|
|
||||||
(require (submod ".." expander))
|
(require (submod ".." expander))
|
||||||
|
@ -1159,7 +1158,7 @@ And, last but not least, we will add a @tc[test] module.
|
||||||
"../lib/low.rkt"
|
"../lib/low.rkt"
|
||||||
(for-syntax (submod ".." expander)
|
(for-syntax (submod ".." expander)
|
||||||
racket/list
|
racket/list
|
||||||
"../lib/low-untyped.rkt"))
|
(submod "../lib/low.rkt" untyped)))
|
||||||
|
|
||||||
<test-expand-type>
|
<test-expand-type>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user