> BoolFunc<%> (Func<%> BooleanColumn))(define-type AnyFunc<%> (Func<%>
> ColIdent))
>
> And this used to work on older versions of racket, say Racket BC 7.4
>
> But on Racket CS 7.6, I get an error on this line:
> (define-type AnyFunc<%> (Func<%> ColIdent))
>
> Even though (a) it doesn't throw an error on the line before it, and
> (b) replacing it with (define-type AnyFunc<%> (BaseFunc<%> ColIdent
> FuncAnyParam))
> works.
>
> I thought the way define-type works is that
> (Func<%> ColIdent)
> would expand into (BaseFunc<%> ColIdent FuncAnyParam)
>
> I've had similar problems with define-type previously where I'd think it
> would just expand
> by substituting the parameter but it doesn't seem to really do that. I don't
> have any
> trivial example to show, though. Fiddling around eventually gets it to
> work.
>
> I'd really appreciate some help as to how to think about what define-type
> does in my head.
>
That code should work. There's a bug somewhere, either TR or deeper.
I am thinking its deeper because the code sometimes compiles.
1. When I first tried `raco pkg install remap` (using a current CS), it worked
2. Then I tried compiling with BC 7.6 and CS 7.6. BC succeeded and CS failed.
3. Later, I saw 2 consecutive runs of CS fail and succeed:
```
(20:02)% rm -r compiled
(20:02)% /Applications/RacketCS-v7.6/bin/raco make -v tables.rkt
"tables.rkt":
making #<path:/Users/ben/code/racket/fork/extra-pkgs/remap/private/tables.rkt>
/Users/ben/code/racket/fork/extra-pkgs/remap/private/tables.rkt:59:3:
Type Checker: parse error in type;
expected a class type for #:implements clause
given: (Opaque Func<%>)
in: (Class #:implements BoolFunc<%>)
compilation context...:
/Users/ben/code/racket/fork/extra-pkgs/remap/private/tables.rkt
context...:
do-raise-syntax-error
winder-dummy
.../private/parse-type.rkt:1234:0: merge-with-parent-type
.../private/parse-type.rkt:1364:14: for-loop
.../private/parse.rkt:852:26
.../private/runtime.rkt:80:24: temp5975
.../env/type-alias-helper.rkt:230:4: for-loop
.../env/type-alias-helper.rkt:101:0: register-all-type-aliases
.../typecheck/tc-toplevel.rkt:359:0: type-check
.../typecheck/tc-toplevel.rkt:602:0: tc-module
.../typed-racket/tc-setup.rkt:96:12
winder-dummy
.../typed-racket/typed-racket.rkt:23:4
call-in-empty-metacontinuation-frame
apply-transformer
dispatch-transformer
(1:20:02)% rm -r compiled
rm: compiled: No such file or directory
(1:20:02)% /Applications/RacketCS-v7.6/bin/raco make -v tables.rkt
"tables.rkt":
making #<path:/Users/ben/code/racket/fork/extra-pkgs/remap/private/tables.rkt>
[output to "compiled/tables_rkt.zo"]
```