Thanks Philip, of course I should have checked for something like this directly.
Deren On Thu, Jan 25, 2018 at 3:51 PM, Philip McGrath <phi...@philipmcgrath.com> wrote: > You may just want to use #lang exact-decimal racket (see: > http://docs.racket-lang.org/exact-decimal-lang/index.html). > > I have encountered a similar problem with six arguments to read-syntax > before, and I remember there being a good reason that was explained in some > obscure corner of the documentation, but I don't remember exactly what the > reason was, and I'm not immediately finding it in the documentation, which > perhaps suggests that, whatever the reason is, it should be documented more > prominently. > > -Philip > > On Thu, Jan 25, 2018 at 2:21 PM, Deren Dohoda <deren.doh...@gmail.com> > wrote: > >> Hi everyone, >> >> I am desperately in need of a #lang exact so that decimals are read as >> exact values. >> >> I thought this would be extremely simple: >> ..\exact\lang\reader.rkt >> >> (module reader racket/base >> (provide (rename-out (exact-read read) >> (exact-read-syntax read-syntax))) >> (require (rename-in racket/base (read base:read) (read-syntax >> base:read-syntax))) >> (define (exact-read . in) >> (parameterize ((read-decimal-as-inexact #f)) >> (apply base:read in))) >> (define (exact-read-syntax . in) >> (parameterize ((read-decimal-as-inexact #f)) >> (apply base:read-syntax in)))) >> ;;;;;;;;;; >> It installs alright, though chokes on building docs for some reason, but >> then when I attempt to use it: >> ..\exact\lang\reader.rkt:13:6: read-syntax: arity mismatch; >> the expected number of arguments does not match the given number >> expected: 0 to 2 >> given: 6 >> arguments...: >> >> Why is read-syntax getting six arguments? >> >> Deren >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Racket Users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to racket-users+unsubscr...@googlegroups.com. >> For more options, visit https://groups.google.com/d/optout. >> > > -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.