leif
2017-9-28 15:43:02

@mflatt Okay cool, thanks. :wink:


leif
2017-9-28 15:43:04

:slightly_smiling_face: *


leif
2017-9-28 15:47:09

If I have a macro that expands to a class, is it possible to have a field that is only in scope for the macro itself?


leif
2017-9-28 15:47:46

Something like this almost works, in that the method is only in scope for the macro, but still won’t work if the user creates a method with the same name. https://gist.github.com/LeifAndersen/1a5b188574c6756f6b888c7365276544


leif
2017-9-28 15:47:47

ben
2017-9-28 16:20:50

@samth is it ok if I merge https://github.com/racket/typed-racket/pull/599 tonight?


mflatt
2017-9-28 17:43:14

@leif Introduce a define-local-member-name alongside your class


leif
2017-9-28 17:48:43

@mflatt Isn’t that what the example did?


leif
2017-9-28 17:50:01

Anyway, Michael helped me find a solution, as shown here: https://gist.github.com/LeifAndersen/1318798979267ea46ae8ac3933c64989

We ‘think’ the problem is that the internal method name is just a symbol (rather than an identifier), which is what causes the error.


leif
2017-9-28 17:50:02

mflatt
2017-9-28 17:51:01

Oh, sorry — I misread it. I’m not sure why that didn’t work, and I can’t investigate more just now.


leif
2017-9-28 17:51:11

But because its the internal binding, an identifier should work (we think anyway).


leif
2017-9-28 17:51:21

So we’re going to submit a bug report.


leif
2017-9-28 17:51:25

@mflatt okay cool, thanks.


samth
2017-9-28 18:23:45

@ben that seems fine to me


ben
2017-9-28 18:25:32

thanks