ype that works, which is
> `Nothing`.
>
> This actually tells you more about your second program -- in
> particular, you can't ever call the `val` function from the `(Foo a)`,
> because you can't construct a value of type `a`.
>
> Sam
>
> On Fri, Jul 21, 2017 at
b) (Foo b)) and
it can unify a = Integer, b = String, from the first argument alone. So, even
though a is Integer, it still produces a = Nothing, without a compile error.
Integer =/= Nothing. Seems very close to a bug in the type deduction algorithm.
>
>
> On Fri, J
Consider this program,
#lang typed/racket
(struct (a) Foo ([val : (-> a)]))
(: foo/s (All (a b)
(-> (-> a b)
(-> (Foo a)
(Foo b)
(Foo b)
(define (foo/s f)
(λ ([f1 : (Foo a)]
[f2 : (Foo b)])
f2))
(define
(1 2 3 4)))
> (send s1 first)
> (send s1 rest)
>
> ((inst seq-first Integer) s1)
> ((inst seq-rest Integer) s1)
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> On Jul 18, 2017, at 2:57 AM,
Hi!
I am encountering a type checker error for the following program but not sure
exactly what is wrong with it. The program is as follows:
#lang typed/racket
(define-type (Seq a) (Object [first (-> a)]
[rest (-> (Seq a))]))
(: seq-first (All (a
On Monday, May 22, 2017 at 6:14:01 PM UTC+5:30, Matthias Felleisen wrote:
> Could you list the functions you’re missing?
>
>
>
> > On May 22, 2017, at 5:38 AM, Sourav Datta wrote:
> >
> > Is there any ongoing or planned effort to port additional functi
Is there any ongoing or planned effort to port additional functions available
for vectors, sequences etc. to TR? Many of these functions are very useful
while writing code which uses things beyond normal Lists and it seems we have
to manually require/typed for each individual program. Surprising
Hello all!
I have a question regarding how sequence abstraction works in TR. In the
sequence part of the docs it says that a sequence can consist of lists or
vectors among other things. But does this make a function which ideally accepts
a (Listof a) to accept something that is declared as a (S
On Sunday, February 5, 2017 at 4:06:13 AM UTC+5:30, Matthew Butterick wrote:
> On Feb 4, 2017, at 8:18 AM, Sourav Datta wrote:
>
> (require/typed "grammar1.rkt"
> [parse (->* (Listof Token)
> (Any)
> Sy
Hi everyone!
I was taking a look at the brag library (http://docs.racket-lang.org/brag/) for
AST generation and thought of using it in one of my projects which is in TR. I
started by requiring brag/support with type annotations like this:
#lang typed/racket
(require/typed brag/support
On Saturday, October 1, 2016 at 3:10:12 PM UTC+5:30, Sourav Datta wrote:
> I am currently trying to use racket/tcp library in a TR program and used
> require/typed to import the necessary functions as I could not find this
> provided with TR by default. However, the following code has
I am currently trying to use racket/tcp library in a TR program and used
require/typed to import the necessary functions as I could not find this
provided with TR by default. However, the following code has a problem when it
runs:
#lang typed/racket
(require/typed racket/tcp
[op
On Tuesday, September 20, 2016 at 7:41:23 PM UTC+5:30, Matthias Felleisen wrote:
> > On Sep 20, 2016, at 4:23 AM, Sourav Datta wrote:
> >
> > Is it possible to import an untyped class into typed Racket? I know how to
> > require for functions or structs but there seem
Is it possible to import an untyped class into typed Racket? I know how to
require for functions or structs but there seems to be no documentation about
classes. Thanks!
--
You received this message because you are subscribed to the Google Groups
"Racket Users" group.
To unsubscribe from this
name (memoize (lambda ({arg : t} ...) body ...]))
>
>
> (define-memoized (fib {n Integer}) Integer
> (if (<= n 1)
> 1
> (+ (fib (- n 1))
> (fib (- n 2)
>
> (fib 10)
>
>
>
> > On Sep 5, 2016, at 3:11 AM, Sourav Datta wrote:
Another day, another typed racket question!
I was experimenting with memoize library in Racket and noticed that it does not
always work with typed racket functions (or, may be I was not 'require'ing it
properly). So I came up with this crude implementation below and it seems to be
working for o
/cc (lambda ({c : (-> Number EmptySet)})
> (set! d-or-s c)
> (+ x x
>
>
> > On Aug 29, 2016, at 2:18 PM, Sourav Datta wrote:
> >
> > Hey everyone,
> >
> > I am a beginner in Racket and recently learned the basic concepts of
> >
Hey everyone,
I am a beginner in Racket and recently learned the basic concepts of
continuations. I like Racket's support of multiple types of continuations as
opposed one type in Scheme. Recently I also started learning about typed
Racket. My problem is, I am not sure how I can annotate a cont
Worked fine! For some reason I was assuming that planet was the latest version
of package manager whereas pkg was the old one! Thanks for the help!
On Sunday, July 17, 2016 at 11:59:34 AM UTC+5:30, johnbclements wrote:
> > On Jul 16, 2016, at 11:13 PM, Sourav Datta wrote:
> >
Hey hey,
I am pretty new to Racket and still experimenting with it. I came across the
nice rsound package and thought to try the examples. I found that the version
installed on my system is 1.10. So I tried to install the latest 4.4 with the
command:
raco planet install clements rsound.plt 4 4
20 matches
Mail list logo