Re: [racket-users] Contracts question on structs

2019-02-15 Thread Chris GauthierDickey
(0 #f . -> . Result?))])) But the contract system complained that both might match (I mean I can see that one is more specific, but I understand it's not a theorem prover, haha). Thoughts? Chris On Fri, Feb 15, 2019 at 7:56 AM Chris GauthierDickey wrote: > I

Re: [racket-users] Contracts question on structs

2019-02-15 Thread Chris GauthierDickey
ontract is not actually attached to the > > bt structure at this point? That's a thing that would be done > > elsewhere, probably in the provide statement. Yes? > > > > > > > > On Thu, Feb 14, 2019 at 7:57 PM Chris GauthierDickey < > chris...@gma

[racket-users] Contracts question on structs

2019-02-14 Thread Chris GauthierDickey
I'm wondering if it's possible to have a contract for a struct that only allows certain kinds of initializations. For example, I have this: (provide (contract-out [struct Result ((name (or/c Temp? Label?)) (global? boolean?) (value (or/c VarValue? #f)))])) But it's too general. What I'd

Re: [racket-users] Problems with syntax coloring a #lang

2019-02-13 Thread Chris GauthierDickey
, 2019 at 8:47 PM Robby Findler wrote: > The lexers can be tricky to get right. I struggled with them a lot. Good > luck! > > Robby > > On Wed, Feb 13, 2019 at 6:29 PM Chris GauthierDickey > wrote: > >> Yes, indeed, it's my own #lang I'm having issues w

Re: [racket-users] Problems with syntax coloring a #lang

2019-02-13 Thread Chris GauthierDickey
ng function. It can be hard to get those right and the colorer > calls into your lang's reader in ways that you might not have realized > you should test. > > Are you using the lexer-contract? Sometimes that can help you find the > input to your lexer that is doesn't work on.

[racket-users] Problems with syntax coloring a #lang

2019-02-12 Thread Chris GauthierDickey
Hi! I seem to have some weird behavior with syntax coloring a #lang. Sometimes it seems to think particular words that are normally correctly colored are errors. For example, if I'm starting to type a keyword, it's coloring it red (which it should), but when I complete the word, it doesn't re-col

[racket-users] creating a REPL for your #lang?

2016-10-18 Thread Chris GauthierDickey
Greetings all, Googled around and searched through documents but I couldn't find an answer. Me and a colleague built a #lang on top of racket and I've been able to get it to run in the Definitions window of Dr Racket but not in the REPL (either in Dr. Racket or from the command line). I'm not ge