
This allows the types generated by the struct form, as well as #:struct clauses of require/typed, to be specified explicitly using a #:type-name option. This allows the name of a struct and the type it is assigned to be different. Closes #261
11 lines
239 B
Racket
11 lines
239 B
Racket
#lang typed/racket/base
|
|
|
|
(require/typed
|
|
net/url-structs
|
|
[#:struct path/param
|
|
([path : (U String 'up 'same)]
|
|
[param : (Listof String)])
|
|
#:type-name Path/Param])
|
|
|
|
(ann (path/param "path" null) Path/Param)
|