Re: [racket-users] A bug in the Typed Racket system?

2017-08-11 Thread Sourav Datta
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

Re: [racket-users] A bug in the Typed Racket system?

2017-07-21 Thread Sourav Datta
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

[racket-users] A bug in the Typed Racket system?

2017-07-21 Thread Sourav Datta
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

Re: [racket-users] Polymorphic functions on Typed Racket classes

2017-07-18 Thread Sourav Datta
(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,

[racket-users] Polymorphic functions on Typed Racket classes

2017-07-17 Thread Sourav Datta
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

Re: [racket-users] Porting additional functions for vectors, sequences, hashes etc. to Typed Racket

2017-05-22 Thread Sourav Datta
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

[racket-users] Porting additional functions for vectors, sequences, hashes etc. to Typed Racket

2017-05-22 Thread Sourav Datta
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

[racket-users] Typed Racket: Using (Sequenceof a) in place of (Listof a)

2017-03-20 Thread Sourav Datta
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

Re: [racket-users] Using brag parser library with Typed Racket

2017-02-05 Thread Sourav Datta
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

[racket-users] Using brag parser library with Typed Racket

2017-02-04 Thread Sourav Datta
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

[racket-users] Re: Require/typed with racket/tcp

2016-10-01 Thread Sourav Datta
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

[racket-users] Require/typed with racket/tcp

2016-10-01 Thread Sourav Datta
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

Re: [racket-users] Importing untyped class into typed racket

2016-09-20 Thread Sourav Datta
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

[racket-users] Importing untyped class into typed racket

2016-09-20 Thread Sourav Datta
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

Re: [racket-users] syntax-parse in typed racket

2016-09-06 Thread Sourav Datta
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:

[racket-users] syntax-parse in typed racket

2016-09-05 Thread Sourav Datta
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

Re: [racket-users] Typed racket and continuations

2016-08-29 Thread Sourav Datta
/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 > >

[racket-users] Typed racket and continuations

2016-08-29 Thread Sourav Datta
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

Re: [racket-users] Rsound build problem for versions >= 3

2016-07-16 Thread Sourav Datta
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: > >

[racket-users] Rsound build problem for versions >= 3

2016-07-16 Thread Sourav Datta
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