codewars / codewars-runner-cli

Old CodeRunner project. See https://github.com/codewars/runner instead.
GNU Affero General Public License v3.0
400 stars 141 forks source link

Add Typed Racket support for Racket #764

Closed yfzhe closed 4 years ago

yfzhe commented 4 years ago

Typed Racket is gradual typing variant of racket. We can write static typing programs with it.


:+1: reactions might help.

kazk commented 4 years ago

This can be done by simply installing typed-racket-lib right?

Then current

#lang racket
(provide add)

(define (add a b) (+ a b))

can also be written with types:

#lang typed/racket
(provide add)

(: add (-> Integer Integer Integer))
(define (add a b) (+ a b))
yfzhe commented 4 years ago

Yes.

It seems that the racket environment codewars using is minimal-racket, which lacks typed-racket-lib. So installing it is the solution.

kazk commented 4 years ago

Cool. Just wanted to make sure I wasn't misunderstanding.

Yeah, it's using minimal-racket because the default installation includes a lot of things that's never going to be used and makes the container image much larger.

I'll close this when I deploy it.

kazk commented 4 years ago

Deployed