Re: [racket-users] How to use dates (especially gregor) with Typed Racket?

2019-12-11 Thread Ben Greenman
Thanks for the feedback! I opened a pull request for the docs: https://github.com/racket/typed-racket/pull/886 Happy to continue the discussion over there. (The example I added to the guide is maybe too simple.) -- You received this message because you are subscribed to the Google Groups

Re: [racket-users] How to use dates (especially gregor) with Typed Racket?

2019-12-11 Thread Marc Kaufmann
On Saturday, December 7, 2019 at 3:04:25 PM UTC+1, Ben Greenman wrote: > > On 12/7/19, Marc Kaufmann > wrote: > > Thanks Ben and Jon, that did the trick. > > > > I realized when following the code that the structure wasn't exported - > but > > > > I didn't know how to work around that. I

Re: [racket-users] How to use dates (especially gregor) with Typed Racket?

2019-12-07 Thread Ben Greenman
On 12/7/19, Marc Kaufmann wrote: > Thanks Ben and Jon, that did the trick. > > I realized when following the code that the structure wasn't exported - but > > I didn't know how to work around that. I now also checked the > documentation, and the only thing I found on opaque types is >

Re: [racket-users] How to use dates (especially gregor) with Typed Racket?

2019-12-07 Thread Marc Kaufmann
I meant `require/typed` obviously, not `require-typed`. On Saturday, December 7, 2019 at 11:17:00 AM UTC+1, Marc Kaufmann wrote: > > Thanks Ben and Jon, that did the trick. > > I realized when following the code that the structure wasn't exported - > but I didn't know how to work around that. I

Re: [racket-users] How to use dates (especially gregor) with Typed Racket?

2019-12-07 Thread Marc Kaufmann
Thanks Ben and Jon, that did the trick. I realized when following the code that the structure wasn't exported - but I didn't know how to work around that. I now also checked the documentation, and the only thing I found on opaque types is

Re: [racket-users] How to use dates (especially gregor) with Typed Racket?

2019-12-04 Thread Jon Zeppieri
On Tue, Dec 3, 2019 at 8:55 PM Ben Greenman wrote: > > The error is because gregor/time doesn't export a struct. But > nevermind that, because you're probably best off with an opaque type: > > ``` > #lang typed/racket > > (require/typed gregor/time > [#:opaque Time time?] > [time (->*

Re: [racket-users] How to use dates (especially gregor) with Typed Racket?

2019-12-03 Thread Ben Greenman
The error is because gregor/time doesn't export a struct. But nevermind that, because you're probably best off with an opaque type: ``` #lang typed/racket (require/typed gregor/time [#:opaque Time time?] [time (->* [Integer] [Integer Integer Integer] Time)] [time->iso8601 (-> Time