On this page:
top
up

8.11Legacy ContractsπŸ”— i

procedure

( make-proj-contract nameprojfirst-order)contract?

name:any/c
proj :
contact?
contact?
(-> any/c any/c )))
first-order:(-> any/c boolean? )
Builds a contract using an old interface.

Modulo errors, it is equivalent to:
#:namename
#:first-orderfirst-order
#:projection
(cond
(lambda (blame)
(proj(blame-positive blame)
(list (blame-source blame)(blame-value blame))
(not (blame-swapped? blame))))]
(lambda (blame)
(proj(blame-positive blame)
(list (blame-source blame)(blame-value blame))
(blame-contract blame)))]))

procedure

src
pos
name
fmt
arg...)any/c
val:any/c
src:any/c
pos:any/c
name:any/c
fmt:string?
arg:any/c
Calls raise-blame-error after building a blame struct from the val, src, pos, and name arguments. The fmt string and following arguments are passed to format and used as the string in the error message.

procedure

( contract-proc c)

Constructs an old-style projection from a contract.

The resulting function accepts the information that is in a blame struct and returns a projection function that checks the contract.

top
up

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /