Re: [racket-users] srcloc->string exported by tr/base but without type?

2016-06-28 Thread Sam Tobin-Hochstadt
No, this is just an oversight, presumably.

You could contribute this improvement to other Typed Racket users by making
a change to `typed-racket/base-env/base-env` (here:
https://github.com/racket/typed-racket/blob/master/typed-racket-lib/typed-racket/base-env/base-env.rkt
).

In general, minor issues with TR are probably best handled as Issues on the
GitHub repo.

Sam

On Tue, Jun 28, 2016 at 5:49 PM 'John Clements' via Racket Users <
racket-users@googlegroups.com> wrote:

> This just seems like an oversight… the program
>
> #lang typed/racket/base
>
> srcloc?
>
> srcloc->string
>
> … fails to type-check because typed/racket/base doesn’t include a type for
> srcloc->string. Based on the documentation, it looks like I can use the
> type (srcloc -> (U String False)) for this type, and I can certainly add
> this myself, like this:
>
> (require/typed typed/racket/base
>[srcloc->string (srcloc -> (U String False))])
>
> Is there some reason this isn’t already built in?
>
> John
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to racket-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] srcloc->string exported by tr/base but without type?

2016-06-28 Thread 'John Clements' via Racket Users
This just seems like an oversight… the program

#lang typed/racket/base

srcloc?

srcloc->string

… fails to type-check because typed/racket/base doesn’t include a type for 
srcloc->string. Based on the documentation, it looks like I can use the type 
(srcloc -> (U String False)) for this type, and I can certainly add this 
myself, like this:

(require/typed typed/racket/base
   [srcloc->string (srcloc -> (U String False))])

Is there some reason this isn’t already built in?

John


-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


signature.asc
Description: PGP signature