
I am seeing an interesting behaviour in one of my raco test
machines. This is specific to Windows. When I run raco test -x -p s10
I get a failure on windows: bv.rkt: raco test: non-zero exit: -1073741819
The interesting thing is that this does not happen on Linux, and it doesn’t happen on Windows either if I run raco test s10\bv.rkt
. Any ideas of what the problem could be? (this is racket 6.12)

It sounds like a “guard” as in syntax-case.

It isn’t a guard, it’s more like an escape continuation.

Guards are written as #:when condition
in match
.

It’s useful when a later pattern might match, so an earlier, more specific pattern can bail out back to the pattern matcher and request it to continue as if the earlier pattern hadn’t actually matched. (I’ll write an example.)

> (match '(1 2 3)
[(list a b c)
(=> continue)
(when (= b 2)
(continue))
'one]
[(list a b c)
'two])
'two

It’s usually not necessary, since you can normally get away with just using #:when
, I think. But it might be useful if you need to bail out deep inside some nested computation on the RHS.

Sure! Though there might be a better example than that.

@mbutterick @lexi.lambda it might be helpful to give an example that can’t be expressed as #:when

the =>
form uses continuations so it can bail out of anything

Right. I saw some uses in TR that use it to write match
-in-match
, where failing from the inner match
bails back to the outer match
.

Hello, I’m working on getting a package listed in the official racket package index. I believe I have everything set up correctly, but I can’t get the documentation link to show up on the website. The package is uploaded at https://pkgd.racket-lang.org/pkgn/package/softposit-rkt

Any guidance on where I should look to update this?

@dthien the docs are rendered by the package server when there’s a full build of all packages, which happens every night I think. Tomorrow you should see the docs online assuming everything about your package is setup correctly

Cool, thanks for the info!

happy to help! You’ll also have all your package’s tests run automatically too, btw

Another question, my package relies on git submodules which don’t seem to work when building through the package manager. Is there a way to force the package manager to also download the submodules?

Amendment to my previous question, git in general doesn’t seem to work with raco pkg install
. In particular, there is no .git
folder downloaded when you try to install a package.

Found a workaround with git subtree
, but using submodules would still be ideal