Is it possible to use other #lang
s in #lang scribble/lp
for literate programming?
For example, I want to use #lang typed/racket
in #lang scribble/lp
. How to realize that?
It doesn't appear so, but you can use a typed/racket evaluator with scribble/eval.
#lang scribble/manual
@(require racket/sandbox
scribble/eval)
@(define my-evaluator
(parameterize ([sandbox-output 'string]
[sandbox-error-output 'string])
(make-evaluator 'typed/racket/base)))
@interaction[#:eval my-evaluator
(: my-sqr (Real -> Real))
(define (my-sqr x)
(* x x))
(my-sqr 42)]
Example taken from here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With