Hi,

"(" <pa...@disroot.org> skribis:

> On Tue Aug 9, 2022 at 9:59 PM BST, Maxime Devos wrote:
>> 'chmod' is not mentioned anywhere in (guix scripts style), so I'd think 
>> it's just an oversight. The authority on the matter would be Ludovic 
>> Courtès <l...@gnu.org>
>
> Is it possible that (guix read-print) stores octal numbers directly as
> Scheme numbers, with no way to distinguish them from decimal numbers,
> which means when they are printed they are just treated as base10? I
> poked around a bit in the module but couldn't find the code for number
> reading.

Indeed, the reader is basically a wrapper around ‘read’.  It preserves
comments and vertical space, but it doesn’t attempt to preserve the
style of numbers (base, etc.), strings (whether \n & co. are escaped or
literal), and so on.  I think that’d be a bit too much honestly.

Now, we could tweak the pretty printer so that it recognizes patterns
where numbers or strings should be printed in a certain way.

Help welcome! :-)

Ludo’.



Reply via email to