[racket] define-type on List and Listof

From: Alexander D. Knauth (alexander at knauth.org)
Date: Wed Jun 18 01:48:33 EDT 2014

Would using only-in, rename-in, or rename-out work for what you’re doing?

#lang typed/racket

(require (only-in typed/racket [List MyList]))

(ann '(1 2 3) (MyList 1 2 3))

On Jun 17, 2014, at 5:32 PM, Spencer Florence <spencer at florence.io> wrote:

> Hi all,
> 
> I'm trying to rename some types in typed/racket but something odd is happening:
> 
> (define-type A Listof)
> 
> works but:
> 
> (define-type B List)
> 
> errors with "Type Checker: parse error in type; type name `List' is unbound in: List"
> 
> Is this a bug or am I missing something?
> 
> --Spencer
> ____________________
>  Racket Users list:
>  http://lists.racket-lang.org/users



Posted on the users mailing list.