[racket] [Typed Racket] define-predicate for union with functions

2013-05-20 Thread Paul Leger
Hi all, Maybe, this question is very easy. In the following code, I try defining a predicate for T2, but I cannot because T1 it is a function. (define-type T1 (Symbol -> Any) ) (define-type T2 (U Symbol Number T1)) ;(define-predicate T1? Procedure) ;this line is useless (define-predicat

[racket] [Typed Racket] "define-predicate" in Racket 5.3.4

2013-05-09 Thread Paul Leger
Hi all, In the Racket 5.3.4, I defined the following predicate >(define-predicate A? Procedure) and later, I tried using as follow: >(A? 'a) But I have the following error: >recursive-contract: contract violation >expected: flat-contract? >given: #<|chaperone-case->|> BTW, i

[racket] Decrease fontsize in @racketblock[..]

2012-02-03 Thread Paul Leger
mment function? I tried with ~n, It does not work. -- Saludos, Paul Leger Racket Users list: http://lists.racket-lang.org/users

[racket] Use of "struct:"

2012-01-27 Thread Paul Leger
Hi all, A simple question. I try typing the following example (module nest racket (provide (struct-out egg)) (struct egg (color wt))) in this way (module nest typed/racket (provide (struct-out egg)) (struct: egg ([color : String] [wt : Number]))) But I get: module: identif

Re: [racket] fonts missing with latest .deb from PPA

2012-01-26 Thread Paul Leger
ts, but I'm not sure what it might be. Anybody have a suggestion to try? I am using Racket from the following PPA (Ubuntu 11.10): https://launchpad.net/~plt/+archive/racket and I can use several fonts. -- Saludos, Paul Leger. Racket Users list: http://lists.racket-lang.org/users

Re: [racket] [typed] optional parameter

2011-11-11 Thread Paul Leger
ot;define: not an identifier, identifier with default, or keyword for procedure argument in: (#(x : Number) 10)" Do I need a extra piece of code If I want to use a function with optional parameters inside of a module? Thank you, Paul Leger. -- Saludos, Paul Leger. _