Re: [racket-users] Typed racket equivalent of Haskell newtype?

2015-05-23 Thread Stuart Hungerford
On Sunday, 24 May 2015 12:50:48 UTC+10, Matthias Felleisen wrote: > Stuart, would a predicated refinement type work for you: > > -- > http://docs.racket-lang.org/ts-reference/special-forms.html?q=define-predicate#%28form._%28%28lib._typed-racket%2Fbase-env%2Fprims..rkt%29._make-predicate%29%29

Re: [racket-users] Typed racket equivalent of Haskell newtype?

2015-05-23 Thread Stuart Hungerford
On Sunday, 24 May 2015 08:14:30 UTC+10, Alex Knauth wrote: > As far as I know, this doesn’t exist in typed racket currently, but I’m > wondering: (I’m thinking of seeing if I can implement this when I have time > this summer) > > How should sub-typing interact with this? > Should it be a comp

Re: [racket-users] Typed racket equivalent of Haskell newtype?

2015-05-23 Thread Matthias Felleisen
Stuart, would a predicated refinement type work for you: -- http://docs.racket-lang.org/ts-reference/special-forms.html?q=define-predicate#%28form._%28%28lib._typed-racket%2Fbase-env%2Fprims..rkt%29._make-predicate%29%29 On May 23, 2015, at 6:14 PM, Alexander D. Knauth wrote: > As far as I

[racket-users] Is there a way to access test submodule from repl in DrRacket?

2015-05-23 Thread Alexander D. Knauth
Is there a way to access definitions in the test submodule from the repl in DrRacket as if I were in the repl of the test submodule? I tried these and they didn’t work: #lang racket (require racket/enter) (module+ test (define x 3)) > (enter! (submod "try-repl-submod-test.rkt" test)) > x x: u

Re: [racket-users] Typed racket equivalent of Haskell newtype?

2015-05-23 Thread Alexander D. Knauth
As far as I know, this doesn’t exist in typed racket currently, but I’m wondering: (I’m thinking of seeing if I can implement this when I have time this summer) How should sub-typing interact with this? Should it be a completely separate type, not related by sub-typing at all, or should the ne

[racket-users] Generic collections in Racket

2015-05-23 Thread Alexis King
It's no secret that I've been angling to try and implement a generic collections library in Racket for a while now. After a few iterations, I think I've found a model I'm satisfied with. It's become big enough to now consider useful, so I'd like to get some feedback. If you're interested: $ rac

[racket-users] Typed racket equivalent of Haskell newtype?

2015-05-23 Thread Stuart Hungerford
Hi, Is there an idiomatic Typed Racket equivalent to the Haskell concept of newtypes? https://www.haskell.org/tutorial/moretypes.html That is, some way to have separate types that share a common structure? For example I'd like to define "Radians" and "Degrees" types that are both implemented

RE: [racket-users] racket versus racket/base

2015-05-23 Thread Jos Koot
Thanks. Your answer clarifies my brain. Jos _ From: racket-users@googlegroups.com [mailto:racket-users@googlegroups.com] On Behalf Of Alexander D. Knauth Sent: sábado, 23 de mayo de 2015 20:06 To: Jos Koot Cc: Racket-Users List Subject: Re: [racket-users] racket versus racket/base It so

Re: [racket-users] racket versus racket/base

2015-05-23 Thread Alexander D. Knauth
It sounds to me like you're understanding this perfectly. racket provides all of racket/base for-syntax. On May 23, 2015, at 1:52 PM, Jos Koot wrote: > This works: > > #lang racket > (define-syntax (x y) (syntax-case y () (_ (syntax (quote monkey) > x ; -> monkey > > This does not work >

[racket-users] racket versus racket/base

2015-05-23 Thread Jos Koot
This works: #lang racket (define-syntax (x y) (syntax-case y () (_ (syntax (quote monkey) x ; -> monkey This does not work #lang racket/base (define-syntax (x y) (syntax-case y () (_ (syntax (quote monkey) gives the expansion time error: syntax-case: unbound identifier in the tran

Re: [racket-users] Flower Garden: Open Flowers

2015-05-23 Thread Matthias Felleisen
Why don't you put this into github and register it with the package server? On May 23, 2015, at 1:22 PM, Michael Tiedtke wrote: > This is a feature release for those interested in solitaire card games. > > Keywords: message passing, solitaire, stateful objects, parallel objects, > hint sys

Re: [racket-users] Flower Garden: Open Flowers

2015-05-23 Thread Michael Tiedtke
This is a feature release for those interested in solitaire card games. Keywords: message passing, solitaire, stateful objects, parallel objects, hint system, Flower Garden (There is also an integrated window cleaner.) ;-) -- You received this message because you are subscribed to the Google G

[racket-users] exn->string

2015-05-23 Thread Tony Garnock-Jones
Hi all, I find myself using exn->string from web-server/private/util *a lot* in many of my packages. (I just counted eight!) Should we move it to core Racket, so I don't need to depend on a private subcollect of the web-server-lib package everywhere? It seems like something many programs, not ju

RE: [racket-users] disappeeraing binding arrows

2015-05-23 Thread Jos Koot
Thanks, that is minimal indeed. Jos -Original Message- From: gus.ma...@gmail.com [mailto:gus.ma...@gmail.com] On Behalf Of Gustavo Massaccesi Sent: sábado, 23 de mayo de 2015 0:17 To: Jos Koot Cc: Alexander D. Knauth; Racket-Users List Subject: Re: [racket-users] disappeeraing binding arr