Remove legacy require/typed form.
original commit: bb0b071f385c42c4a4ba8cf54db032bb47a3e010
This commit is contained in:
parent
54d6d3ffec
commit
2393bd43a3
|
@ -18,9 +18,9 @@
|
|||
|
||||
(module require-tests typed-scheme
|
||||
(provide z)
|
||||
(require/typed x Number 'm)
|
||||
(require/typed 'm (x Number))
|
||||
(+ x 3)
|
||||
(require/typed y (Number -> Number) 'm)
|
||||
(require/typed 'm (y (Number -> Number)))
|
||||
(define: z : Number (y (+ x 4))))
|
||||
|
||||
|
||||
|
|
|
@ -44,9 +44,10 @@
|
|||
|
||||
;; fixme - type aliases should work in require
|
||||
|
||||
(require/typed current-compare (-> (top top -> number)) srfi/67)
|
||||
(require/typed =? ((top top -> number) top top -> boolean) srfi/67)
|
||||
(require/typed <? ((top top -> number) top top -> boolean) srfi/67)
|
||||
(require/typed srfi/67
|
||||
[current-compare (-> (top top -> number))]
|
||||
[=? ((top top -> number) top top -> boolean)]
|
||||
[<? ((top top -> number) top top -> boolean)])
|
||||
|
||||
;;; DATA DEFINITION
|
||||
|
||||
|
|
|
@ -3,18 +3,20 @@
|
|||
|
||||
#;(require "../list.scm"
|
||||
"../etc.rkt")
|
||||
(require/typed apply-to-scheme-files
|
||||
((Path -> (Listof (Listof (U #f (Listof (U Real #f))))))
|
||||
Path
|
||||
-> (Listof (U #f (Listof (Listof ( U #f (Listof (U Real #f)))))))) "foldo.rkt")
|
||||
(require/typed "foldo.rkt"
|
||||
(apply-to-scheme-files
|
||||
((Path -> (Listof (Listof (U #f (Listof (U Real #f))))))
|
||||
Path
|
||||
-> (Listof (U #f (Listof (Listof ( U #f (Listof (U Real #f))))))))))
|
||||
|
||||
(define-type-alias top Any)
|
||||
(define-type-alias str String)
|
||||
|
||||
(require/typed filename-extension (Path -> (U #f Bytes)) (lib "file.rkt"))
|
||||
(require/typed normalize-path (Path Path -> Path) (lib "file.rkt"))
|
||||
(require/typed explode-path (Path -> (Listof Path)) (lib "file.rkt"))
|
||||
(require/typed srfi48::format (Port String String top * -> top) "patch.rkt")
|
||||
(require/typed mzlib/file
|
||||
[filename-extension (Path -> (U #f Bytes))]
|
||||
[normalize-path (Path Path -> Path)]
|
||||
[explode-path (Path -> (Listof Path))])
|
||||
(require/typed "patch.rkt" [srfi48::format (Port String String top * -> top)])
|
||||
;; FIXME - prefix
|
||||
#;(require/typed srfi48:format ( Port String String top * -> top) (prefix-in srfi48: (lib "48.rkt" "srfi")))
|
||||
(require (lib "match.rkt")
|
||||
|
|
|
@ -12,10 +12,12 @@
|
|||
(require (prefix-in heap: "leftist-heap.ss")
|
||||
(except-in (lib "67.ss" "srfi") number-compare current-compare =? <?)
|
||||
(only-in "leftist-heap.ss" comparator))
|
||||
(require/typed number-compare (number number -> number) (lib "67.ss" "srfi"))
|
||||
(require/typed current-compare (-> (top top -> number)) (lib "67.ss" "srfi"))
|
||||
(require/typed =? ((top top -> number) top top -> boolean) (lib "67.ss" "srfi"))
|
||||
(require/typed <? ((top top -> number) top top -> boolean) (lib "67.ss" "srfi"))
|
||||
(require/typed
|
||||
srfi/67
|
||||
[number-compare (number number -> number)]
|
||||
[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>)
|
||||
|
||||
|
|
|
@ -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 ...))))
|
||||
(raise-syntax-error #f "at least one specification is required" stx))
|
||||
#`(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]) ...)
|
||||
(with-syntax ([cnt* (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)
|
||||
#,(ignore #'(require/contract pred hidden (any/c . c-> . boolean?) lib))
|
||||
#,(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
|
||||
;of struct (the id constructor shouldn't expand to it)
|
||||
#,(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))
|
||||
|
||||
(require/typed lib
|
||||
|
|
Loading…
Reference in New Issue
Block a user