Andrew Kent
Andrew Kent
I guess as well from our lecture today I had assumed we did not have binary numerals, but had `Nat`s and expressions over `Nat`s instead of binary numeral expressions, etc
Cool - let me look at adding a few tweaks so specifying type variables is optional (i.e. the old syntax is valid too) and I'll report (today or tomorrow).
Duplicate code: We should be able to use the features of the [syntax/parse](http://docs.racket-lang.org/syntax/stxparse.html) library to avoid duplicate code (using features like ~or, ~bind, and syntax classes). Polymorphic issues: There's a...
Yikes - tinkered with that a little longer than I thought I would =) Well for now I threw together [something](https://github.com/andmkent/datatype/blob/master/experimental/datatype.rkt) that supports both non-polymorphic and polymorphic definitions: ``` racket...
Oh - and the syntax choices were rather arbitrary (e.g. [#:inst ...] was easy to parse =)-- so if you wanted to play around with it and pick something that...
So, at the moment w/ 'define-datatype' you cannot define a polymorphic datatype like (Opt a) -- this is _only_ because I overlooked this feature (oops) as I was hacking together...
Oops -- I left off `splice-rw` which is also a simple/useful one IMHO.
Through some quick experimentation (i.e. I haven't checked the code) I did not seem to get any errors with multi-line input on any of those forms (but for a few,...
I see -- that makes sense. `splice-rw` drops the leading symbol and the parens from the form, e.g. if could be used to typeset `(typeof Γ ⊢ e : τ)`...
Um... I could be mistaken but it looks to me like it literally just drops them from the `lw`: ``` (define (splice-rw) (compound-rw 'splice-rw (lambda (lws) (drop-right (drop lws 2)...