gt; Original Message
> On Jan 3, 2021, 12:18 AM, Michael MacLeod < michaelmmacl...@gmail.com>
> wrote:
>
>
> There's an edge case of 'module' when only one form is provided which
> results in that form being partially expanded to determine if s
There's an edge case of 'module' when only one form is provided which
results in that form being partially expanded to determine if such
expansion would lead to a #%plain-module-begin form. Otherwise (more than
one form provided) they are wrapped in #%module-begin with no partial
expansion occurrin
Does this example work: http://pasterack.org/pastes/95923?
`if-not-defined` is written as a provide transformer which uses
`syntax-local-module-defined-identifiers` to get the list of phase-0
identifiers defined in the module.
Best,
Michael
[code also pasted below]:
#lang racket/base
(module i
The issue isn't actually with the `(_ (x y))` pattern---it's with the
`#'(require (x y))` template.
When `require` is passed a module path like `(file "test1.rkt")`, it
introduces any identifiers [just `ok` in this case] with the same lexical
context of the module path itself[1].
The issue is tha
I'm not sure this is possible with only using `match` patterns. A
combination of the `list-rest` and `app` patterns as well as the `in-slice`
procedure from `racket/sequence` should do the trick, though:
#lang racket
(require racket/match)
(define (collect-optional-vals x)
(for/list ([y (in-sl
You can parameterize `current-command-line-arguments` like so:
```
#lang racket
(require racket/cmdline)
(define foo (make-parameter 7))
(parameterize ([current-command-line-arguments #("--thing" "9")])
(command-line
#:program "foo"
#:once-each
[("--thing") thing "The thing" (foo thi
$ racket -i -l scribble/reader -e "(use-at-readtable)" -l
your-lang-without-@-support
should do the trick. For example, to start a REPL in typed/racket with
@-reader support, you would use:
$ racket -i -l scribble/reader -e "(use-at-readtable)" -l typed/racket
> @+[2 3]
- : Integer [more precis
I believe this due to an edge case of 'module': when there is only one form
provided, it is partially expanded to determine if its expansion would lead
to a #%plain-module-begin form. Otherwise (more than one form provided)
they are wrapped in #%module-begin with no partial expansion occurring.
>F
8 matches
Mail list logo