typed-racket/typed-racket-test/succeed/require-typed-struct-custom-type.rkt
Alexis King a3ca5aeefc Allow the types created for structs to be specified manually
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
2015-12-30 13:12:05 -08:00

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)