rhyme-lang / rhyme

18 stars 1 forks source link

Rhyme Type Rules #50

Open IsaacFleetwood opened 5 days ago

IsaacFleetwood commented 5 days ago

I've put together a document of the current type rules, aswell as including some of the notes that we discussed in the meeting today. Every rule is labeled with a location, so we can identify the specific rule being discussed when talking about it. TypingRules.pdf

There are a lot of notes regarding potential deviations in direction that could take place. They are labelled with a "TODO" in front.

The PDF does disclude the Any type. Given the requirement that a well-typed expression utilizing it must not error (as opposed to Unknown), this means that just about the only place where it can be used is in the General Stateful Operations, which

Aswell, we did discuss avoiding overflow by upcasting values, while the PDF runs under the assumption of preserving the input types when possible.

TiarkRompf commented 5 days ago

Very nice! Do you want to check in the source to the rhyme-papers repo?

Some thoughts right off the bat:

Edit: other things to consider for interaction of stateful ops with Nothing/Error: