[racket] Issue with require/typed and the json library
> It doesn’t have to be a struct, but the problem is that typed racket doesn’t know that a value of type String for instance will be of type JSExpr or not, so you would have to put (assert x jsexpr?) around everything that you want to treat as a jsexpr.
Ah, that’s interesting. I’d seen assert when digging through the docs, but I didn’t quite realize how it worked at the time. Looking back at it again, I’m surprised I missed it, but no matter.
That does solve the problem, albeit rather inelegantly. I’d be interested to see if there’s another way, but I would understand why it would be difficult to implement a cleaner approach.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20141205/47777e93/attachment-0001.html>