From f93e0df781b52898a7634f637973e7ff8f730389 Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Mon, 15 Feb 2016 14:28:16 -0600 Subject: [PATCH] explain shortcoming in define-opt/c related to #1238 --- .../scribblings/reference/contracts.scrbl | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/pkgs/racket-doc/scribblings/reference/contracts.scrbl b/pkgs/racket-doc/scribblings/reference/contracts.scrbl index efaa63ca08..81ccb9ea67 100644 --- a/pkgs/racket-doc/scribblings/reference/contracts.scrbl +++ b/pkgs/racket-doc/scribblings/reference/contracts.scrbl @@ -2985,7 +2985,8 @@ the name @racket[opt/c]. @defform[(define-opt/c (id id ...) expr)]{ This defines a recursive contract and simultaneously -optimizes it. Semantically, it behaves just as if +optimizes it. As long as the defined function terminates, +@racket[define-opt/c] behaves just as if the @racket[-opt/c] were not present, defining a function on contracts (except that the body expression must return a contract). But, it also optimizes that contract definition, @@ -3008,7 +3009,15 @@ For example, defines the @racket[bst/c] contract that checks the binary search tree invariant. Removing the @racket[-opt/c] also makes a binary search tree contract, but one that is -(approximately) 20 times slower.} +(approximately) 20 times slower. + +Note that in some cases, a call to a function defined by +@racket[define-opt/c] may terminate, even if the corresponding +@racket[define]-based function would not terminate. This is a +shortcoming in @racket[define-opt/c] that we hope to understand +and fix at some point, but have no concrete plans currently. + +} @defthing[contract-continuation-mark-key continuation-mark-key?]{ Key used by continuation marks that are present during contract checking.