Switch functions entirely to Typed Racket.
This commit is contained in:
parent
0e2b91fdd1
commit
9182ea9ecb
2 changed files with 602 additions and 622 deletions
|
@ -1,4 +1,4 @@
|
|||
#lang racket
|
||||
#lang typed/racket
|
||||
|
||||
;;; dds/functions
|
||||
|
||||
|
@ -9,7 +9,6 @@
|
|||
|
||||
(require "utils.rkt")
|
||||
|
||||
(module typed typed/racket
|
||||
(require "utils.rkt"
|
||||
syntax/parse/define typed/racket/stream
|
||||
(only-in typed/racket/unsafe unsafe-provide)
|
||||
|
@ -646,22 +645,3 @@
|
|||
(check-equal? (tabulate*/01 `(,(λ (x y) (min x y)) ,(λ (x y) (max x y))))
|
||||
'((0 0 0 0) (0 1 0 1) (1 0 0 1) (1 1 1 1)))))
|
||||
)
|
||||
)
|
||||
|
||||
(require 'typed)
|
||||
(provide
|
||||
pseudovariadic-lambda pvλ pseudovariadic-define pvdefine
|
||||
tabulate* tabulate*/strict tabulate*/pv
|
||||
tabulate tabulate/strict tabulate/pv
|
||||
tabulate*/pv/boolean tabulate/pv/boolean
|
||||
tabulate*/pv/01 tabulate/pv/01
|
||||
tabulate*/list tabulate/list
|
||||
tabulate*/list/boolean tabulate/list/boolean tabulate*/list/01 tabulate/list/01
|
||||
table->function/list table->function table->function/pv
|
||||
enumerate-boolean-tables enumerate-boolean-functions
|
||||
enumerate-boolean-functions/pv enumerate-boolean-functions/list
|
||||
random-boolean-table random-boolean-function random-boolean-function/list
|
||||
|
||||
(struct-out tbf) tbf-w tbf-θ boolean->01/vector apply-tbf apply-tbf/boolean
|
||||
list->tbf lists->tbfs read-org-tbfs tbf-tabulate* tbf-tabulate
|
||||
tbf-tabulate*/boolean sbf? sbf list->sbf read-org-sbfs)
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
(parameterize ([sandbox-output 'string]
|
||||
[sandbox-error-output 'string]
|
||||
[sandbox-memory-limit 50])
|
||||
(make-evaluator 'typed/racket #:requires '((submod "functions.rkt" typed)))))
|
||||
(make-evaluator 'typed/racket #:requires '("functions.rkt"))))
|
||||
|
||||
@(define-syntax-rule (ex . args)
|
||||
(examples #:eval functions-evaluator . args))
|
||||
|
@ -610,10 +610,10 @@ See also @racket[read-org-tbfs].
|
|||
}
|
||||
@section[#:tag "fuctions/untyped"]{Untyped definitions}
|
||||
|
||||
@defmodule[(submod dds/functions typed untyped)]
|
||||
@defmodule[(submod dds/functions untyped)]
|
||||
|
||||
@(require (for-label (only-in racket/contract/base listof any/c)
|
||||
(for-label (only-in (submod "../functions.rkt" typed untyped)
|
||||
(for-label (only-in (submod "../functions.rkt" untyped)
|
||||
tabulate/boolean tabulate*/boolean
|
||||
tabulate/01 tabulate*/01))))
|
||||
|
||||
|
@ -632,7 +632,7 @@ accompanied by the explicit mention "untyped".
|
|||
(parameterize ([sandbox-output 'string]
|
||||
[sandbox-error-output 'string]
|
||||
[sandbox-memory-limit 50])
|
||||
(make-evaluator 'racket #:requires '((submod "functions.rkt" typed untyped)))))
|
||||
(make-evaluator 'racket #:requires '((submod "functions.rkt" untyped)))))
|
||||
|
||||
@(define-syntax-rule (ex/untyped . args)
|
||||
(examples #:eval functions-evaluator/untyped . args))
|
||||
|
|
Loading…
Reference in a new issue