Re: [racket-dev] What is the policy on what is included in the core libraries?

2015-02-17 Thread Alexander D. Knauth
Somewhat related, would it make sense to add a function like stx-e that would be like (if (syntax? stx) (syntax-e stx) stx) to syntax/stx? On Feb 17, 2015, at 2:18 AM, Alexis King wrote: > I was just thinking today that I would, for example, find it useful to have a > (zip ...) function in rac

Re: [racket-dev] A proposal for parametric opaque types in Typed Racket

2015-01-30 Thread Alexander D. Knauth
the contracts or the set of values that would pass the contracts or something like that. > >> On Jan 30, 2015, at 12:30, Alexander D. Knauth wrote: >> >> >> On Jan 30, 2015, at 1:53 PM, Alexis King wrote: >> >>> No, it doesn’t need to be wrapped

Re: [racket-dev] A proposal for parametric opaque types in Typed Racket

2015-01-30 Thread Alexander D. Knauth
setter function. >> On Jan 30, 2015, at 07:27, Alexander D. Knauth wrote: >> >> On Thu, Jan 29, 2015, at 09:03 PM, Alexis King wrote: >>> It isn’t wrapped in an opaque structure. That wasn’t a part of my proposal, >>> and while I didn’t think of it until y

Re: [racket-dev] A proposal for parametric opaque types in Typed Racket

2015-01-30 Thread Alexander D. Knauth
is passed through the orig contract as if it were going to the typed side, which would unwrap it, and then that unwrapped value would be passed to the new contract as if it were flowing from the untyped side to the typed side. > >> On Jan 29, 2015, at 20:50, Alexander D. Knauth >&g

Re: [racket-dev] A proposal for parametric opaque types in Typed Racket

2015-01-29 Thread Alexander D. Knauth
And for “this isn’t really any different from casting mutable data types,” look at this: #lang typed/racket (: b : (Boxof Number)) (define b (box 1)) (set-box! (cast b (Boxof (U Number String))) "I am a string") (ann (unbox b) Number) ;"I am a string” ; not a contract error > &

Re: [racket-dev] A proposal for parametric opaque types in Typed Racket

2015-01-29 Thread Alexander D. Knauth
Furthermore, even if the wrappers were shared between functions, untyped code would recieved wrapped values, which would render them quite useless. If it’s not an opaque type, but something like a list, then this works, and the untyped code receiving wrapped values isn’t a problem here: #lang ty

Re: [racket-dev] A proposal for parametric opaque types in Typed Racket

2015-01-29 Thread Alexander D. Knauth
Um, for this: (module typed typed/racket/base (provide (struct-out Foo)) (struct [A] Foo ([x : A] [y : A]) #:transparent)) (Foo "a" 'b) Should be fine because Foo could be instantiated at the type (U String Symbol). On Jan 29, 2015, at 9:25 PM, Alexis King wrote: > I recently ran into a

Re: [racket-dev] In Typed Racket, struct declarations do not work in an internal definition context

2015-01-23 Thread Alexander D. Knauth
There’s a bug report about this here: http://bugs.racket-lang.org/query/?cmd=view&pr=14524 Though I notice it gives a different error message now. But why should structure type declarations being a module-wide construct? Internal function definitions work, and internal type definitions work, so why

Re: [racket-dev] question, issue(?) with the scope of identifiers passed into define-syntax-rule

2015-01-15 Thread Alexander D. Knauth
But I think it’s important that it doesn’t use gensym or something like that, it uses syntax-marks, which means you can break these lexical scoping rules if you want/need to by using either syntax-local-introduce or datum->syntax: #lang racket (require syntax/parse/define) (define-simple-macro (

Re: [racket-dev] parse errors in types, poly-dots cause me headaches

2014-11-18 Thread Alexander D. Knauth
In terms of bugs, it’s probably related to this problem with call-with-values and poly-dots: #lang typed/racket (: f : (All (a ...) [(-> (values Any ... a)) -> Void])) (define (f g) (call-with-values g void)) ;=> . . ../../Applications/Racket v6.1.1/share/pkgs/typed-racket-lib/typed-racket/type

Re: [racket-dev] Help with build failed error message

2014-07-21 Thread Alexander D. Knauth
the OS terminated the `racket/racket3m` process > from the outside. For example, the process may have exceeded a > memory-use limit. > > At Sat, 19 Jul 2014 20:25:24 -0400, "Alexander D. Knauth" wrote: >> I made a fork of the racket repo and committed some chang

[racket-dev] Help with build failed error message

2014-07-19 Thread Alexander D. Knauth
I made a fork of the racket repo and committed some changes in a topic branch, but I got this: make[8]: Leaving directory `/home/travis/build/AlexKnauth/racket/racket/src/build' make[7]: Leaving directory `/home/travis/build/AlexKnauth/racket/racket/src/build' make[6]: Leaving directory `/home/