Commit Graph

87 Commits

Author SHA1 Message Date
Emery Hemingway 6b965c5c0e Only catch ValueError during decode 2023-03-01 20:58:17 -06:00
Emery Hemingway dab8f11b9b Serialize dummy text for embeds 2023-03-01 20:58:17 -06:00
Emery Hemingway 66a653a775 Fix expand of embedded Preserves 2022-12-13 22:05:05 -06:00
Emery Hemingway cc0703c343 Fix symbol escaping during conversion to text 2022-12-08 01:00:38 -06:00
Emery Hemingway 3dd112879d Enable tracing for non-POSIX platforms 2022-12-08 01:00:38 -06:00
Emery Hemingway 587c5274f8 Fix preserving of embedded type 2022-12-08 01:00:38 -06:00
Emery Hemingway 806c4118fc Trivially convert from Preserve[void] to Preserve[E] 2022-12-08 01:00:34 -06:00
Emery Hemingway 92834a8968 Add expand, contract for embedded conversions 2022-12-08 00:59:54 -06:00
Emery Hemingway c9268b2a5d Cannot embed a void value 2022-12-08 00:59:54 -06:00
Emery Hemingway 7eea68edb4 Add warning when preserving fails 2022-12-06 22:30:28 -06:00
Emery Hemingway 60c5f03637 Add preservesEmbedded pragma 2022-12-06 22:30:28 -06:00
Emery Hemingway 9f8321a748 Textualize the zero length symbol as || 2022-11-06 11:03:53 -06:00
Emery Hemingway 2d2df1f918 Parse past annotations 2022-11-02 13:58:37 -05:00
Emery Hemingway 4e795cb92a Another getOrDefault 2022-10-30 21:09:17 -05:00
Emery Hemingway 201cb7c68e Check for zero-length binary streams 2022-10-30 17:26:55 -05:00
Emery Hemingway 11661d453c Replace concat with writeText
Write to a stream rather than concatentate a string.
2022-10-30 17:26:55 -05:00
Emery Hemingway b4756b13ae isRecord: add variant with a label 2022-10-27 15:29:45 -05:00
Emery Hemingway 7125eadd49 Use step rather than [] for dictionaries 2022-10-25 17:42:04 -05:00
Emery Hemingway 62480318cc BufferedDecoder: feed by pointer 2022-10-23 23:39:37 -05:00
Emery Hemingway 5fe041fa45 New BufferedDecoder object 2022-10-22 18:40:24 -05:00
Emery Hemingway 918d4d3e2e Fix encoding and decoding of embedded values 2022-10-16 15:32:09 -05:00
Emery Hemingway 54ec2d439a Allocate new TableRefs when necessary 2022-10-13 23:05:37 -05:00
Emery Hemingway cc0472da3d Add apply procedure 2022-06-25 16:19:42 -05:00
Emery Hemingway abb39e02a5 I'm using that, sometimes 2022-06-12 23:05:35 -05:00
Emery Hemingway 5043d8595a Set type conversions 2022-05-18 13:57:40 -05:00
Emery Hemingway ddc26f0c71 Add pragma accessors
This library requires a forked macros module, so export accessors
that would prevent a downstream library from having the same
problems with std/macros.
2022-04-25 11:33:37 -05:00
Emery Hemingway f32e783e0b Unembed during fromPreserve 2022-04-22 00:28:36 -05:00
Emery Hemingway e8d1bf2c57 Refactor mapEmbeds 2022-03-18 18:57:37 -05:00
Emery Hemingway 1dcad539f4 Move preserves/parse module into preserves
Some macros in preserves call `parsePreserves` so include that
proc implicitly.
2022-03-18 11:26:52 -05:00
Emery Hemingway 5408cb859a Add `step` func as a no-effects substitue for `[]` proc
ehmry/xdg_open_ng#2
2022-03-18 10:08:39 -05:00
Emery Hemingway a6b31247cf Fix indentation bug 2022-03-14 14:28:37 -05:00
Emery Hemingway 5f746706b6 Add forked macros module
This one has a more premissive version of "hasCustomPragma".
2022-03-10 23:41:14 -06:00
Emery Hemingway 633cb0a3c4 Tweak fromPreserve for floats and objects 2022-03-10 23:41:14 -06:00
Emery Hemingway 8b52e3baf9 Index into compound types by Preserve keys 2022-03-10 23:41:13 -06:00
Emery Hemingway db06066e17 Trace to stderr, not stdout
This would interfer with stdio communications.
2022-03-08 15:22:49 -06:00
Emery Hemingway 3924e48deb Distinct Symbol strings
More type buracracy makes schema conversion less lossy.
2022-02-20 09:23:49 -06:00
Emery Hemingway 6c4cfa0885 Fix fromPreserve for distinct types
This is an example of why bypassing the type system with "when"
is dangerous.
2022-02-11 15:36:30 -06:00
Emery Hemingway ba4d567791 Careful with those variable length tuples 2021-12-24 00:38:02 +01:00
Emery Hemingway e25e06efba Don't convert Table[string,string] to {symbol:string...:...}
Should not assume that table keys can be treated at symbols. This
also makes the resulting dictionary convertable to JSON.
2021-12-22 23:49:06 +01:00
Emery Hemingway 200e0a0080 Do not leak null characters into the #"" encoding 2021-12-05 21:30:54 +00:00
Emery Hemingway 7cc0b050f4 Remove support for integers wider than 64 bits
I believe this was an unecessary compilication and it can be
restored later if necesary.
2021-11-12 12:25:28 +01:00
Emery Hemingway e88c238a74 Schema text parsing 2021-11-11 21:57:04 +01:00
Emery Hemingway 6039a729c8 Do not intersperse commas in sequences 2021-11-07 17:30:42 +01:00
Emery Hemingway ef4278062a Encode short byte-strings as hex text 2021-11-03 19:17:33 +01:00
Emery Hemingway 29d7352a23 Assert upreservable pragma at runtime
This makes the compiler less pedantic.
2021-10-25 21:36:57 +02:00
Emery Hemingway d1be46de49 Equality across different embedded types 2021-10-25 21:36:57 +02:00
Emery Hemingway 0387cbc7eb Update documentation 2021-10-25 21:36:57 +02:00
Emery Hemingway ae5f4b78ac Adjust stringification 2021-10-25 21:36:45 +02:00
Emery Hemingway bc9568d6bd Add unembed routine 2021-10-25 21:36:45 +02:00
Emery Hemingway a03a188bc2 fromPreserve: fix conversion of literals in tuples 2021-10-25 21:36:45 +02:00