jgm / typst-hs

Haskell library for parsing and evaluating typst
Other
44 stars 5 forks source link

Implement typst's toml() function #8

Closed glguy closed 1 year ago

glguy commented 1 year ago

~I haven't tested this because I don't really know how to use typst, but I did emulate what I saw from the related functions you directed me to.~

I've updated the expected toml test output file; I think it looks right but I'm relying on you to know what you're looking at.

glguy commented 1 year ago

It was a judgement call to map the data-time things I could to a VDateTime. The test case, data-08, tests out an "offset datetime" and checks that it maps to a string. I don't map the others to a string because you seemed to have a perfectly good alternative to string. Please review that choice and if you don't like the one I guessed you you duplicate the line used for ZonedTime on the other 3 datetime cases.

jgm commented 1 year ago

Great, thank you.