Permalink
Browse files

remove interning for most Reps in TR

Prior to this change (which was Typed Racket PR 469) all internal TR
objects (Reps) were interned and kept around for the entire duration
of type checking.  Because of this, frequent operations that rebuilt
types were particularly costly (e.g. various forms of
substitution). To recoup some of this cost, caching was being used in
a lot of places. This PR sought to remove interning as the default
behavior for Reps and allow for more flexibility in how we approach
time/space performance needs going forward.

The following changes were included in this overhaul:

Interning: All Reps are no longer interned. Right now we only intern
unions and some propositions.

Rep generic operations: we now use racket/generic so we're not
reinventing this wheel.

Singletons: Reps (e.g. TrueProp, Univ, etc) can be declared singleton,
which creates a single instance of the rep that all visible operations
(even within the declaring module) are defined in terms of
(e.g. predicates are defined as (λ (x) (eq? x singleton-instance)),
etc).

Custom constructors: Custom constructors can be specified for Reps,
which allows for simple normalization, interning, or other invariants
to be enfored whenever a Rep is created.

Union: Unions used to try to ensure no obviously overlaping types
would inhabit the same Union (e.g. (U String (Pairof Any Any) (Pairof
Int Int)) would be simplified to (U String (Pairof Any Any))). This,
however, required frequent calls to subtyping every time a Union was
modified and working with Unions thus had a high cost (another thing
that caching was used to reduce). Instead of this, Unions now enforce
a much simpler set of invariants on their members: (1) No duplicates
(by virtue of using a hash-based set), (2) Any and Nothing do not
appear in unions, and (3) Nested unions are flattened. Also, using a
hashset as the internal data structure meant that we could easily
intern unions w.r.t. equal? equality. NOTE: we do reduce unions to not
contain obviously overlapping terms when printing to users and when
generating contracts (so obviously and avoidable inneficient contracts
are not generated – See union.rkt for 'normalize-type').

Subtyping changes: Subtyping has been designed to reduce dispatch time
w/ a switch since we no longer cache _all_ subtyping calls (we only
cache subtyping results for unions since they have some costly
subtyping).

prop-ops changes: AndProps now are careful to sort OrProps by length
before building the resulting proposition. This is done because
OrProp implication only checks if one Or is a subset of another Or.
By ordering Or props by size, we only ever check if an OrProp implies
another if its size is <= the other OrProp. This also makes the
smart constructor '-and' more robust, since the order the props
appear does not affect if some Ors are kept or not.

Testing: More subtype tests have been added (we are still probably
relying too much on typecheck-tests.rkt and not the more granular unit
tests in general).  Also, typecheck-tests.rkt has been changed to
check for type-equivalence (i.e. subtyping in both directions)
instead of equal? equivalence.
  • Loading branch information...
pnwamk committed Oct 21, 2016
1 parent 90a4d73 commit 8e7f39025ab0ece5691cba6aea507e3bf51fc943
Showing with 3,638 additions and 2,745 deletions.
  1. +1 −1 typed-racket-lib/typed-racket/base-env/base-env-indexing-abs.rkt
  2. +79 −72 typed-racket-lib/typed-racket/base-env/base-env.rkt
  3. +21 −20 typed-racket-lib/typed-racket/base-env/base-special-env.rkt
  4. +1 −1 typed-racket-lib/typed-racket/base-env/base-structs.rkt
  5. +8 −7 typed-racket-lib/typed-racket/base-env/base-types.rkt
  6. +2 −2 typed-racket-lib/typed-racket/base-env/env-lang.rkt
  7. +2 −2 typed-racket-lib/typed-racket/base-env/extra-env-lang.rkt
  8. +2 −4 typed-racket-lib/typed-racket/env/global-env.rkt
  9. +22 −24 typed-racket-lib/typed-racket/env/init-envs.rkt
  10. +3 −3 typed-racket-lib/typed-racket/env/mvar-env.rkt
  11. +7 −19 typed-racket-lib/typed-racket/env/signature-env.rkt
  12. +4 −3 typed-racket-lib/typed-racket/env/type-alias-helper.rkt
  13. +1 −6 typed-racket-lib/typed-racket/env/type-env-structs.rkt
  14. +2 −2 typed-racket-lib/typed-racket/env/type-name-env.rkt
  15. +4 −4 typed-racket-lib/typed-racket/infer/constraints.rkt
  16. +108 −89 typed-racket-lib/typed-racket/infer/infer-unit.rkt
  17. +20 −22 typed-racket-lib/typed-racket/infer/intersect.rkt
  18. +9 −10 typed-racket-lib/typed-racket/infer/promote-demote.rkt
  19. +3 −1 typed-racket-lib/typed-racket/infer/signatures.rkt
  20. +2 −1 typed-racket-lib/typed-racket/optimizer/fixnum.rkt
  21. +1 −1 typed-racket-lib/typed-racket/optimizer/float.rkt
  22. +1 −1 typed-racket-lib/typed-racket/optimizer/number.rkt
  23. +2 −2 typed-racket-lib/typed-racket/optimizer/sequence.rkt
  24. +1 −1 typed-racket-lib/typed-racket/optimizer/utils.rkt
  25. +12 −9 typed-racket-lib/typed-racket/private/parse-type.rkt
  26. +2 −2 typed-racket-lib/typed-racket/private/type-annotation.rkt
  27. +68 −65 typed-racket-lib/typed-racket/private/type-contract.rkt
  28. +52 −74 typed-racket-lib/typed-racket/rep/core-rep.rkt
  29. +40 −24 typed-racket-lib/typed-racket/rep/free-variance.rkt
  30. +28 −22 typed-racket-lib/typed-racket/rep/object-rep.rkt
  31. +45 −51 typed-racket-lib/typed-racket/rep/prop-rep.rkt
  32. +68 −0 typed-racket-lib/typed-racket/rep/rep-switch.rkt
  33. +329 −260 typed-racket-lib/typed-racket/rep/rep-utils.rkt
  34. +358 −283 typed-racket-lib/typed-racket/rep/type-rep.rkt
  35. +17 −11 typed-racket-lib/typed-racket/rep/values-rep.rkt
  36. +1 −1 typed-racket-lib/typed-racket/static-contracts/equations.rkt
  37. +4 −4 typed-racket-lib/typed-racket/static-contracts/parametric-check.rkt
  38. +6 −5 typed-racket-lib/typed-racket/typecheck/check-below.rkt
  39. +2 −2 typed-racket-lib/typed-racket/typecheck/check-class-unit.rkt
  40. +1 −1 typed-racket-lib/typed-racket/typecheck/check-subforms-unit.rkt
  41. +1 −1 typed-racket-lib/typed-racket/typecheck/check-unit-unit.rkt
  42. +1 −1 typed-racket-lib/typed-racket/typecheck/tc-app/tc-app-eq.rkt
  43. +4 −3 typed-racket-lib/typed-racket/typecheck/tc-app/tc-app-hetero.rkt
  44. +40 −22 typed-racket-lib/typed-racket/typecheck/tc-app/tc-app-list.rkt
  45. +1 −1 typed-racket-lib/typed-racket/typecheck/tc-app/tc-app-objects.rkt
  46. +3 −3 typed-racket-lib/typed-racket/typecheck/tc-envops.rkt
  47. +2 −2 typed-racket-lib/typed-racket/typecheck/tc-expr-unit.rkt
  48. +3 −2 typed-racket-lib/typed-racket/typecheck/tc-funapp.rkt
  49. +1 −1 typed-racket-lib/typed-racket/typecheck/tc-lambda-unit.rkt
  50. +2 −2 typed-racket-lib/typed-racket/typecheck/tc-literal.rkt
  51. +7 −5 typed-racket-lib/typed-racket/typecheck/tc-metafunctions.rkt
  52. +3 −3 typed-racket-lib/typed-racket/typecheck/tc-send.rkt
  53. +4 −4 typed-racket-lib/typed-racket/typecheck/tc-structs.rkt
  54. +1 −1 typed-racket-lib/typed-racket/typecheck/tc-subst.rkt
  55. +6 −2 typed-racket-lib/typed-racket/typecheck/tc-toplevel.rkt
  56. +1 −1 typed-racket-lib/typed-racket/typecheck/toplevel-trampoline.rkt
  57. +9 −23 typed-racket-lib/typed-racket/types/abbrev.rkt
  58. +7 −43 typed-racket-lib/typed-racket/types/base-abbrev.rkt
  59. +1 −1 typed-racket-lib/typed-racket/types/classes.rkt
  60. +3 −5 typed-racket-lib/typed-racket/types/current-seen.rkt
  61. +1 −1 typed-racket-lib/typed-racket/types/generalize.rkt
  62. +8 −11 typed-racket-lib/typed-racket/types/kw-types.rkt
  63. +63 −21 typed-racket-lib/typed-racket/types/match-expanders.rkt
  64. +61 −61 typed-racket-lib/typed-racket/types/numeric-tower.rkt
  65. +19 −9 typed-racket-lib/typed-racket/types/overlap.rkt
  66. +10 −12 typed-racket-lib/typed-racket/types/path-type.rkt
  67. +21 −15 typed-racket-lib/typed-racket/types/printer.rkt
  68. +170 −162 typed-racket-lib/typed-racket/types/prop-ops.rkt
  69. +38 −11 typed-racket-lib/typed-racket/types/resolve.rkt
  70. +3 −3 typed-racket-lib/typed-racket/types/substitute.rkt
  71. +7 −6 typed-racket-lib/typed-racket/types/subtract.rkt
  72. +571 −391 typed-racket-lib/typed-racket/types/subtype.rkt
  73. +1 −1 typed-racket-lib/typed-racket/types/type-table.rkt
  74. +42 −44 typed-racket-lib/typed-racket/types/union.rkt
  75. +4 −4 typed-racket-lib/typed-racket/types/update.rkt
  76. +169 −0 typed-racket-lib/typed-racket/utils/hset.rkt
  77. +7 −5 typed-racket-lib/typed-racket/utils/tc-utils.rkt
  78. +10 −0 typed-racket-lib/typed-racket/utils/utils.rkt
  79. +2 −3 typed-racket-more/typed/pict.rkt
  80. +2 −2 typed-racket-more/typed/racket/async-channel.rkt
  81. +1 −1 typed-racket-more/typed/rackunit/type-env-ext.rkt
  82. +1 −1 typed-racket-test/fail/issue-169-1.rkt
  83. +1 −1 typed-racket-test/fail/issue-169-2.rkt
  84. +0 −1 typed-racket-test/performance/infer-timing.rkt
  85. +1 −1 typed-racket-test/unit-tests/check-below-tests.rkt
  86. +2 −2 typed-racket-test/unit-tests/class-tests.rkt
  87. +244 −243 typed-racket-test/unit-tests/contract-tests.rkt
  88. +2 −2 typed-racket-test/unit-tests/generalize-tests.rkt
  89. +246 −222 typed-racket-test/unit-tests/infer-tests.rkt
  90. +5 −5 typed-racket-test/unit-tests/init-env-tests.rkt
  91. +1 −1 typed-racket-test/unit-tests/metafunction-tests.rkt
  92. +4 −4 typed-racket-test/unit-tests/parse-type-tests.rkt
  93. +1 −1 typed-racket-test/unit-tests/prop-tests.rkt
  94. +2 −2 typed-racket-test/unit-tests/remove-intersect-tests.rkt
  95. +20 −15 typed-racket-test/unit-tests/special-env-typecheck-tests.rkt
  96. +1 −1 typed-racket-test/unit-tests/static-contract-conversion-tests.rkt
  97. +11 −3 typed-racket-test/unit-tests/subst-tests.rkt
  98. +403 −201 typed-racket-test/unit-tests/subtype-tests.rkt
  99. +11 −4 typed-racket-test/unit-tests/test-utils.rkt
  100. +3 −3 typed-racket-test/unit-tests/type-equal-tests.rkt
  101. +2 −3 typed-racket-test/unit-tests/type-printer-tests.rkt
  102. +27 −27 typed-racket-test/unit-tests/typecheck-tests.rkt
  103. +1 −1 typed-racket-test/unit-tests/typed-units-tests.rkt
@@ -4,7 +4,7 @@
"../utils/utils.rkt"
(for-template racket/base racket/list racket/unsafe/ops racket/flonum racket/extflonum racket/fixnum)
(utils tc-utils)
(rename-in (types union abbrev numeric-tower) [-Number N] [-Boolean B] [-Symbol Sym]))
(rename-in (types abbrev numeric-tower) [-Number N] [-Boolean B] [-Symbol Sym]))
(provide indexing)
@@ -23,22 +23,29 @@
(only-in racket/private/pre-base new-apply-proc)
(only-in (types abbrev) [-Boolean B] [-Symbol Sym] -Flat)
(only-in (types numeric-tower) [-Number N])
(only-in (rep type-rep values-rep)
make-ClassTop
make-UnitTop
make-Name
(only-in (rep type-rep values-rep object-rep)
-car
-cdr
-force
-field
-syntax-e
-ClassTop
-UnitTop
make-ValuesDots
make-MPairTop
make-BoxTop make-ChannelTop make-VectorTop
make-ThreadCellTop
-MPairTop
-BoxTop
-ChannelTop
-VectorTop
-ThreadCellTop
make-Ephemeron
make-CustodianBox
make-HeterogeneousVector
make-Continuation-Mark-Keyof
make-Continuation-Mark-KeyTop
-Continuation-Mark-KeyTop
make-Prompt-Tagof
make-Prompt-TagTop
make-StructType make-StructTypeTop
-Prompt-TagTop
make-StructType
-StructTypeTop
make-ListDots))
;; Racket Reference
@@ -829,18 +836,18 @@
[unsafe-set-mcdr! (-poly (a b)
(cl->* (-> (-mpair a b) b -Void)
(-> (-mlst a) (-mlst a) -Void)))]
[mpair? (make-pred-ty (make-MPairTop))]
[mpair? (make-pred-ty -MPairTop)]
[mlist (-poly (a) (->* (list) a (-mlst a)))]
[mlength (-poly (a) (-> (-mlst a) -Index))]
[mreverse! (-poly (a) (-> (-mlst a) (-mlst a)))]
[mappend (-poly (a) (->* (list) (-mlst a) (-mlst a)))]
;; Section 4.11 (Vectors)
[vector? (make-pred-ty (make-VectorTop))]
[vector? (make-pred-ty -VectorTop)]
[vector->list (-poly (a) (cl->* (-> (-vec a) (-lst a))
(-> (make-VectorTop) (-lst Univ))))]
(-> -VectorTop (-lst Univ))))]
[list->vector (-poly (a) (-> (-lst a) (-vec a)))]
[vector-length ((make-VectorTop) . -> . -Index)]
[vector-length (-VectorTop . -> . -Index)]
[vector (-poly (a) (->* (list) a (-vec a)))]
[vector-immutable (-poly (a) (->* (list) a (-vec a)))]
[vector->immutable-vector (-poly (a) (-> (-vec a) (-vec a)))]
@@ -893,26 +900,26 @@
[box-immutable (-poly (a) (a . -> . (-box a)))]
[unbox (-poly (a) (cl->*
((-box a) . -> . a)
((make-BoxTop) . -> . Univ)))]
(-BoxTop . -> . Univ)))]
[set-box! (-poly (a) ((-box a) a . -> . -Void))]
[box-cas! (-poly (a) ((-box a) a a . -> . -Boolean))]
[unsafe-unbox (-poly (a) (cl->*
((-box a) . -> . a)
((make-BoxTop) . -> . Univ)))]
(-BoxTop . -> . Univ)))]
[unsafe-set-box! (-poly (a) ((-box a) a . -> . -Void))]
[unsafe-unbox* (-poly (a) (cl->*
((-box a) . -> . a)
((make-BoxTop) . -> . Univ)))]
(-BoxTop . -> . Univ)))]
[unsafe-set-box*! (-poly (a) ((-box a) a . -> . -Void))]
[unsafe-box*-cas! (-poly (a) ((-box a) a a . -> . -Boolean))]
[box? (make-pred-ty (make-BoxTop))]
[box? (make-pred-ty -BoxTop)]
;; Section 4.13 (Hash Tables)
[hash? (make-pred-ty -HashTop)]
[hash-eq? (-> -HashTop B)]
[hash-eqv? (-> -HashTop B)]
[hash-equal? (-> -HashTop B)]
[hash-weak? (-> -HashTop B)]
[hash? (make-pred-ty -HashtableTop)]
[hash-eq? (-> -HashtableTop B)]
[hash-eqv? (-> -HashtableTop B)]
[hash-equal? (-> -HashtableTop B)]
[hash-weak? (-> -HashtableTop B)]
[hash (-poly (a b) (cl->* (-> (-HT a b))
(a b . -> . (-HT a b))
(a b a b . -> . (-HT a b))
@@ -944,33 +951,33 @@
(cl-> [((-HT a b) a) b]
[((-HT a b) a (-val #f)) (-opt b)]
[((-HT a b) a (-> c)) (Un b c)]
[(-HashTop a) Univ]
[(-HashTop a (-val #f)) Univ]
[(-HashTop a (-> c)) Univ]))]
[(-HashtableTop a) Univ]
[(-HashtableTop a (-val #f)) Univ]
[(-HashtableTop a (-> c)) Univ]))]
[hash-ref! (-poly (a b) (-> (-HT a b) a (-> b) b))]
[hash-has-key? (-HashTop Univ . -> . B)]
[hash-has-key? (-HashtableTop Univ . -> . B)]
[hash-update! (-poly (a b)
(cl-> [((-HT a b) a (-> b b)) -Void]
[((-HT a b) a (-> b b) (-> b)) -Void]))]
[hash-update (-poly (a b)
(cl-> [((-HT a b) a (-> b b)) (-HT a b)]
[((-HT a b) a (-> b b) (-> b)) (-HT a b)]))]
[hash-remove (-poly (a b) (cl-> [((-HT a b) Univ) (-HT a b)]
[(-HashTop Univ) -HashTop]))]
[(-HashtableTop Univ) -HashtableTop]))]
[hash-remove! (-poly (a b) (cl-> [((-HT a b) a) -Void]
[(-HashTop a) -Void]))]
[(-HashtableTop a) -Void]))]
[hash-map (-poly (a b c) (cl-> [((-HT a b) (a b . -> . c)) (-lst c)]
[(-HashTop (Univ Univ . -> . c)) (-lst c)]))]
[(-HashtableTop (Univ Univ . -> . c)) (-lst c)]))]
[hash-for-each (-poly (a b c) (cl-> [((-HT a b) (-> a b c)) -Void]
[(-HashTop (-> Univ Univ c)) -Void]))]
[hash-count (-> -HashTop -Index)]
[hash-empty? (-> -HashTop -Boolean)]
[(-HashtableTop (-> Univ Univ c)) -Void]))]
[hash-count (-> -HashtableTop -Index)]
[hash-empty? (-> -HashtableTop -Boolean)]
[hash-keys (-poly (a b) (cl-> [((-HT a b)) (-lst a)]
[(-HashTop) (-lst Univ)]))]
[(-HashtableTop) (-lst Univ)]))]
[hash-values (-poly (a b) (cl-> [((-HT a b)) (-lst b)]
[(-HashTop) (-lst Univ)]))]
[(-HashtableTop) (-lst Univ)]))]
[hash->list (-poly (a b) (cl-> [((-HT a b)) (-lst (-pair a b))]
[(-HashTop) (-lst (-pair Univ Univ))]))]
[(-HashtableTop) (-lst (-pair Univ Univ))]))]
[hash-copy (-poly (a b) (-> (-HT a b) (-HT a b)))]
[eq-hash-code (-> Univ -Fixnum)]
@@ -980,23 +987,23 @@
[hash-iterate-first (-poly (a b)
(cl->*
((-HT a b) . -> . (Un (-val #f) -Integer))
(-> -HashTop (Un (-val #f) -Integer))))]
(-> -HashtableTop (Un (-val #f) -Integer))))]
[hash-iterate-next (-poly (a b)
(cl->*
((-HT a b) -Integer . -> . (Un (-val #f) -Integer))
(-> -HashTop -Integer (Un (-val #f) -Integer))))]
(-> -HashtableTop -Integer (Un (-val #f) -Integer))))]
[hash-iterate-key (-poly (a b)
(cl->* ((-HT a b) -Integer . -> . a)
(-> -HashTop -Integer Univ)))]
(-> -HashtableTop -Integer Univ)))]
[hash-iterate-value (-poly (a b)
(cl->* ((-HT a b) -Integer . -> . b)
(-> -HashTop -Integer Univ)))]
(-> -HashtableTop -Integer Univ)))]
[hash-iterate-pair (-poly (a b)
(cl->* ((-HT a b) -Integer . -> . (-pair a b))
(-> -HashTop -Integer Univ)))]
(-> -HashtableTop -Integer Univ)))]
[hash-iterate-key+value (-poly (a b)
(cl->* ((-HT a b) -Integer . -> . (-values (list a b)))
(-> -HashTop -Integer (-values (list Univ Univ)))))]
(-> -HashtableTop -Integer (-values (list Univ Univ)))))]
[make-custom-hash (->opt (-> Univ Univ Univ) (-> Univ -Nat) [(-> Univ -Nat)] Univ)]
[make-immutable-custom-hash (->opt (-> Univ Univ Univ) (-> Univ -Nat) [(-> Univ -Nat)] Univ)]
@@ -1146,7 +1153,7 @@
;; Section 5.2 (Structure Types)
[make-struct-type
(->opt -Symbol
(-opt (make-StructTypeTop))
(-opt -StructTypeTop)
-Nat -Nat
[Univ
(-lst (-pair -Struct-Type-Property Univ))
@@ -1155,7 +1162,7 @@
(-lst -Nat)
(-opt top-func)
(-opt -Symbol)]
(-values (list (make-StructTypeTop) top-func top-func top-func top-func)))]
(-values (list -StructTypeTop top-func top-func top-func top-func)))]
[make-struct-field-accessor (->opt top-func -Nat [(-opt -Symbol)] top-func)]
[make-struct-field-mutator (->opt top-func -Nat [(-opt -Symbol)] top-func)]
@@ -1173,33 +1180,33 @@
;; Section 5.6 (Structure Utilities)
[struct->vector (Univ . -> . (-vec Univ))]
[struct? (-> Univ -Boolean)]
[struct-type? (make-pred-ty (make-StructTypeTop))]
[struct-type? (make-pred-ty -StructTypeTop)]
;; Section 6.2 (Classes)
[object% (-class)]
;; Section 6.11 (Object, Class, and Interface Utilities)
[object? (make-pred-ty (-object))]
[class? (make-pred-ty (make-ClassTop))]
[class? (make-pred-ty -ClassTop)]
;; TODO: interface?
;; generic?
[object=? (-> (-object) (-object) -Boolean)]
[object->vector (->opt (-object) [Univ] (-vec Univ))]
;; TODO: class->interface
;; object-interface
[is-a? (-> Univ (make-ClassTop) -Boolean)]
[subclass? (-> Univ (make-ClassTop) -Boolean)]
[is-a? (-> Univ -ClassTop -Boolean)]
[subclass? (-> Univ -ClassTop -Boolean)]
;; TODO: implementation?
;; interface-extension?
;; method-in-interface?
;; interface->method-names
[object-method-arity-includes? (-> (-object) -Symbol -Nat -Boolean)]
[field-names (-> (-object) (-lst -Symbol))]
[object-info (-> (-object) (-values (list (Un (make-ClassTop) (-val #f)) -Boolean)))]
[object-info (-> (-object) (-values (list (Un -ClassTop (-val #f)) -Boolean)))]
;; TODO: class-info (is this sound to allow?)
;; Section 7.8 (Unit Utilities)
[unit? (make-pred-ty (make-UnitTop))]
[unit? (make-pred-ty -UnitTop)]
;; Section 9.1
[exn:misc:match? (-> Univ B)]
@@ -1309,47 +1316,47 @@
(make-ValuesDots (list (-result b)) c 'c))
(make-ValuesDots (list (-result (Un a b))) c 'c))))]
[call-with-continuation-barrier (-poly (a) (-> (-> a) a))]
[continuation-prompt-available? (-> (make-Prompt-TagTop) B)]
[continuation-prompt-available? (-> -Prompt-TagTop B)]
[continuation?
(asym-pred Univ B (-PS (-is-type 0 top-func) -tt))]
[continuation-prompt-tag? (make-pred-ty (make-Prompt-TagTop))]
[continuation-prompt-tag? (make-pred-ty -Prompt-TagTop)]
[dynamic-wind (-poly (a) (-> (-> ManyUniv) (-> a) (-> ManyUniv) a))]
;; Section 10.5 (Continuation Marks)
;; continuation-marks needs type for continuations as other
;; possible first argument
[continuation-marks
(->opt (Un (-val #f) -Thread) [(make-Prompt-TagTop)] -Cont-Mark-Set)]
[current-continuation-marks (->opt [(make-Prompt-TagTop)] -Cont-Mark-Set)]
(->opt (Un (-val #f) -Thread) [-Prompt-TagTop] -Cont-Mark-Set)]
[current-continuation-marks (->opt [-Prompt-TagTop] -Cont-Mark-Set)]
[continuation-mark-set->list
(-poly (a)
(cl->*
(->opt -Cont-Mark-Set (make-Continuation-Mark-Keyof a)
[(make-Prompt-TagTop)] (-lst a))
(->opt -Cont-Mark-Set Univ [(make-Prompt-TagTop)] (-lst Univ))))]
[-Prompt-TagTop] (-lst a))
(->opt -Cont-Mark-Set Univ [-Prompt-TagTop] (-lst Univ))))]
[continuation-mark-set->list*
(-poly (a b)
(cl->*
(->opt -Cont-Mark-Set
(-lst (make-Continuation-Mark-Keyof a))
[b (make-Prompt-TagTop)]
[b -Prompt-TagTop]
(-lst (-vec (Un a b))))
(->opt -Cont-Mark-Set
(-lst Univ)
[Univ (make-Prompt-TagTop)]
[Univ -Prompt-TagTop]
(-lst (-vec Univ)))))]
[continuation-mark-set-first
(-poly (a b)
(cl->*
(-> (-opt -Cont-Mark-Set) (make-Continuation-Mark-Keyof a)
(-opt a))
(->opt (-opt -Cont-Mark-Set) (make-Continuation-Mark-Keyof a)
[b (make-Prompt-TagTop)]
[b -Prompt-TagTop]
(Un a b))
(->opt (-opt -Cont-Mark-Set) Univ [Univ (make-Prompt-TagTop)] Univ)))]
(->opt (-opt -Cont-Mark-Set) Univ [Univ -Prompt-TagTop] Univ)))]
[call-with-immediate-continuation-mark
(-poly (a) (->opt Univ (-> Univ a) [Univ] a))]
[continuation-mark-key? (make-pred-ty (make-Continuation-Mark-KeyTop))]
[continuation-mark-key? (make-pred-ty -Continuation-Mark-KeyTop)]
[continuation-mark-set? (make-pred-ty -Cont-Mark-Set)]
[make-continuation-mark-key
(-poly (a) (->opt [-Symbol] (make-Continuation-Mark-Keyof a)))]
@@ -1438,7 +1445,7 @@
;; Section 11.2.2
[make-channel (-poly (a) (-> (-channel a)))]
[channel? (make-pred-ty (make-ChannelTop))]
[channel? (make-pred-ty -ChannelTop)]
[channel-get (-poly (a) ((-channel a) . -> . a))]
[channel-try-get (-poly (a) ((-channel a) . -> . (Un a (-val #f))))]
[channel-put (-poly (a) ((-channel a) a . -> . -Void))]
@@ -1468,7 +1475,7 @@
[a a] b)))]
;; Section 11.3.1 (Thread Cells)
[thread-cell? (make-pred-ty (make-ThreadCellTop))]
[thread-cell? (make-pred-ty -ThreadCellTop)]
[make-thread-cell (-poly (a) (->opt a [Univ] (-thread-cell a)))]
[thread-cell-ref (-poly (a) (-> (-thread-cell a) a))]
[thread-cell-set! (-poly (a) (-> (-thread-cell a) a -Void))]
@@ -1755,7 +1762,7 @@
;; Section 12.8
[syntax-recertify (-poly (a) (-> (-Syntax a) (-Syntax Univ) -Inspector Univ (-Syntax a)))]
[syntax-debug-info (-poly (a) (->opt (-Syntax a) [(-opt -Integer) Univ] -HashTop))]
[syntax-debug-info (-poly (a) (->opt (-Syntax a) [(-opt -Integer) Univ] -HashtableTop))]
;; Section 12.9
[expand (-> Univ (-Syntax Univ))]
@@ -2495,23 +2502,23 @@
[make-sibling-inspector (->opt [-Inspector] -Inspector)]
[current-inspector (-Param -Inspector -Inspector)]
[struct-info (-> Univ (-values (list (-opt (make-StructTypeTop)) B)))]
[struct-info (-> Univ (-values (list (-opt -StructTypeTop) B)))]
[struct-type-info
(-poly (a)
(cl->*
(-> (make-StructType a)
(-values (list Sym -Nat -Nat (-> a -Nat Univ)
(-> a -Nat (Un) -Void) (-lst -Nat)
(-opt (make-StructTypeTop)) B)))
(-> (make-StructTypeTop)
(-opt -StructTypeTop) B)))
(-> -StructTypeTop
(-values (list Sym -Nat -Nat top-func top-func (-lst -Nat)
(-opt (make-StructTypeTop)) B)))))]
[struct-type-make-constructor (-> (make-StructTypeTop) top-func)]
(-opt -StructTypeTop) B)))))]
[struct-type-make-constructor (-> -StructTypeTop top-func)]
[struct-type-make-predicate
(-poly (a)
(cl->*
(-> (make-StructType a) (make-pred-ty a))
(-> (make-StructTypeTop) (-> Univ B))))]
(-> -StructTypeTop (-> Univ B))))]
[object-name (-> Univ Univ)]
;; Section 14.9 (Code Inspectors)
@@ -3069,8 +3076,8 @@
(cl->*
(->acc (list (-pair a b)) b (list -cdr))
(->* (list (-lst a)) (-lst a))))]
[unsafe-vector-length ((make-VectorTop) . -> . -Index)]
[unsafe-vector*-length ((make-VectorTop) . -> . -Index)]
[unsafe-vector-length (-VectorTop . -> . -Index)]
[unsafe-vector*-length (-VectorTop . -> . -Index)]
[unsafe-struct-ref top-func]
[unsafe-struct*-ref top-func]
[unsafe-struct-set! top-func]
Oops, something went wrong.

0 comments on commit 8e7f390

Please sign in to comment.