Sam Westrick

Results 52 comments of Sam Westrick

Great suggestion. I'm definitely interested in adding these!

Yeah I've thought a bit about this and I'm not sure what the best solution is. The simplest solution, from the layout perspective, is something like ```sml datatype doc =...

It might be possible to instead allow each element of the table to be a `doc`, with nested tables. Not sure how to lay those out.

> I would also prefer right-aligning keywords before name definitions so names are aligned Personally I find this really difficult to read, because I look to the left to see...

@HarrisonGrodin I'm thinking we could try adding this to the interface ```sml val table: {numRows: int, numCols: int, elem: {row:int, col:int} -> doc} -> doc ``` I'm picturing that each...

Here's one place where this would be a pain. ```sml val x : foo val y : bar longbar very long bar definitely needs multiple lines bar val z :...

> > And, we would throw a runtime error if an element of a table is rigid (disallowing e.g. nested tables but of course other problematic elements as well). >...

> > You can do this without changing the table definition. If the last doc shouldn't be flattened, then we can just take it out of the table, and prettify...

Supporting this won't be too bad, but will require changes in a few places. For the lexer, we'll need to skip over UTF8 characters in the function [`advance_oneCharOrEscapeSequenceInString`](https://github.com/shwestrick/parse-sml/blob/8aeb8198bb1220f5637212508273dcce25f85de8/src/lex/Lexer.sml#L85). Note that...

By the way, what is the accepted standard practice these days for visually handling "characters" that are encoded as more than one UTF8 character? E.g., the flag emoji "🇺🇸" is...