Remove legacy require/typed form.
This commit is contained in:
parent
7b0608ca42
commit
bb0b071f38
|
@ -18,9 +18,9 @@
|
||||||
|
|
||||||
(module require-tests typed-scheme
|
(module require-tests typed-scheme
|
||||||
(provide z)
|
(provide z)
|
||||||
(require/typed x Number 'm)
|
(require/typed 'm (x Number))
|
||||||
(+ x 3)
|
(+ x 3)
|
||||||
(require/typed y (Number -> Number) 'm)
|
(require/typed 'm (y (Number -> Number)))
|
||||||
(define: z : Number (y (+ x 4))))
|
(define: z : Number (y (+ x 4))))
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -44,9 +44,10 @@
|
||||||
|
|
||||||
;; fixme - type aliases should work in require
|
;; fixme - type aliases should work in require
|
||||||
|
|
||||||
(require/typed current-compare (-> (top top -> number)) srfi/67)
|
(require/typed srfi/67
|
||||||
(require/typed =? ((top top -> number) top top -> boolean) srfi/67)
|
[current-compare (-> (top top -> number))]
|
||||||
(require/typed <? ((top top -> number) top top -> boolean) srfi/67)
|
[=? ((top top -> number) top top -> boolean)]
|
||||||
|
[<? ((top top -> number) top top -> boolean)])
|
||||||
|
|
||||||
;;; DATA DEFINITION
|
;;; DATA DEFINITION
|
||||||
|
|
||||||
|
|
|
@ -3,18 +3,20 @@
|
||||||
|
|
||||||
#;(require "../list.scm"
|
#;(require "../list.scm"
|
||||||
"../etc.rkt")
|
"../etc.rkt")
|
||||||
(require/typed apply-to-scheme-files
|
(require/typed "foldo.rkt"
|
||||||
((Path -> (Listof (Listof (U #f (Listof (U Real #f))))))
|
(apply-to-scheme-files
|
||||||
Path
|
((Path -> (Listof (Listof (U #f (Listof (U Real #f))))))
|
||||||
-> (Listof (U #f (Listof (Listof ( U #f (Listof (U Real #f)))))))) "foldo.rkt")
|
Path
|
||||||
|
-> (Listof (U #f (Listof (Listof ( U #f (Listof (U Real #f))))))))))
|
||||||
|
|
||||||
(define-type-alias top Any)
|
(define-type-alias top Any)
|
||||||
(define-type-alias str String)
|
(define-type-alias str String)
|
||||||
|
|
||||||
(require/typed filename-extension (Path -> (U #f Bytes)) (lib "file.rkt"))
|
(require/typed mzlib/file
|
||||||
(require/typed normalize-path (Path Path -> Path) (lib "file.rkt"))
|
[filename-extension (Path -> (U #f Bytes))]
|
||||||
(require/typed explode-path (Path -> (Listof Path)) (lib "file.rkt"))
|
[normalize-path (Path Path -> Path)]
|
||||||
(require/typed srfi48::format (Port String String top * -> top) "patch.rkt")
|
[explode-path (Path -> (Listof Path))])
|
||||||
|
(require/typed "patch.rkt" [srfi48::format (Port String String top * -> top)])
|
||||||
;; FIXME - prefix
|
;; FIXME - prefix
|
||||||
#;(require/typed srfi48:format ( Port String String top * -> top) (prefix-in srfi48: (lib "48.rkt" "srfi")))
|
#;(require/typed srfi48:format ( Port String String top * -> top) (prefix-in srfi48: (lib "48.rkt" "srfi")))
|
||||||
(require (lib "match.rkt")
|
(require (lib "match.rkt")
|
||||||
|
|
|
@ -12,10 +12,12 @@
|
||||||
(require (prefix-in heap: "leftist-heap.ss")
|
(require (prefix-in heap: "leftist-heap.ss")
|
||||||
(except-in (lib "67.ss" "srfi") number-compare current-compare =? <?)
|
(except-in (lib "67.ss" "srfi") number-compare current-compare =? <?)
|
||||||
(only-in "leftist-heap.ss" comparator))
|
(only-in "leftist-heap.ss" comparator))
|
||||||
(require/typed number-compare (number number -> number) (lib "67.ss" "srfi"))
|
(require/typed
|
||||||
(require/typed current-compare (-> (top top -> number)) (lib "67.ss" "srfi"))
|
srfi/67
|
||||||
(require/typed =? ((top top -> number) top top -> boolean) (lib "67.ss" "srfi"))
|
[number-compare (number number -> number)]
|
||||||
(require/typed <? ((top top -> number) top top -> boolean) (lib "67.ss" "srfi"))
|
[current-compare (-> (top top -> number))]
|
||||||
|
[=? ((top top -> number) top top -> boolean)]
|
||||||
|
[<? ((top top -> number) top top -> boolean)])
|
||||||
|
|
||||||
; a priority-queue is a heap of (cons <priority> <element>)
|
; a priority-queue is a heap of (cons <priority> <element>)
|
||||||
|
|
||||||
|
|
|
@ -137,10 +137,6 @@ This file defines two sorts of primitives. All of them are provided into any mod
|
||||||
(unless (< 0 (length (syntax->list #'(c ...))))
|
(unless (< 0 (length (syntax->list #'(c ...))))
|
||||||
(raise-syntax-error #f "at least one specification is required" stx))
|
(raise-syntax-error #f "at least one specification is required" stx))
|
||||||
#`(begin c.spec ...)]
|
#`(begin c.spec ...)]
|
||||||
[(_ nm:opt-rename ty lib (~optional [~seq #:struct-maker parent]) ...)
|
|
||||||
#`(require/typed #:internal nm ty lib #,@(if (attribute parent)
|
|
||||||
#'(#:struct-maker parent)
|
|
||||||
#'()))]
|
|
||||||
[(_ #:internal nm:opt-rename ty lib (~optional [~seq #:struct-maker parent]) ...)
|
[(_ #:internal nm:opt-rename ty lib (~optional [~seq #:struct-maker parent]) ...)
|
||||||
(with-syntax ([cnt* (generate-temporary #'nm.nm)]
|
(with-syntax ([cnt* (generate-temporary #'nm.nm)]
|
||||||
[hidden (generate-temporary #'nm.nm)]
|
[hidden (generate-temporary #'nm.nm)]
|
||||||
|
@ -679,12 +675,12 @@ This file defines two sorts of primitives. All of them are provided into any mod
|
||||||
(dtsi* () spec ([fld : ty] ...) #:maker maker-name #:type-only)
|
(dtsi* () spec ([fld : ty] ...) #:maker maker-name #:type-only)
|
||||||
#,(ignore #'(require/contract pred hidden (any/c . c-> . boolean?) lib))
|
#,(ignore #'(require/contract pred hidden (any/c . c-> . boolean?) lib))
|
||||||
#,(internal #'(require/typed-internal hidden (Any -> Boolean : nm)))
|
#,(internal #'(require/typed-internal hidden (Any -> Boolean : nm)))
|
||||||
(require/typed (maker-name real-maker) nm lib #:struct-maker parent)
|
(require/typed #:internal (maker-name real-maker) nm lib #:struct-maker parent)
|
||||||
|
|
||||||
;This needs to be a different identifier to meet the specifications
|
;This needs to be a different identifier to meet the specifications
|
||||||
;of struct (the id constructor shouldn't expand to it)
|
;of struct (the id constructor shouldn't expand to it)
|
||||||
#,(if (syntax-e #'extra-maker)
|
#,(if (syntax-e #'extra-maker)
|
||||||
#'(require/typed (maker-name extra-maker) nm lib #:struct-maker parent)
|
#'(require/typed #:internal (maker-name extra-maker) nm lib #:struct-maker parent)
|
||||||
#'(begin))
|
#'(begin))
|
||||||
|
|
||||||
(require/typed lib
|
(require/typed lib
|
||||||
|
|
Loading…
Reference in New Issue
Block a user