Adds a separte typing system #3

Closed
jbwdevries wants to merge 18 commits from milner_type_checking into master
Owner

Prior to this MR, a minimal type system was in place in the parser.

This had its limits. Notably, when coding in the foldl expression,
we had to hardcode the type.

In this MR, we attempt to build something almost, but not quite, entirely
unlike a Hindley-Milner typing system[1].

This also lets us get rid of all the ConstantUIn32 etc. classes.

[1] https://en.wikipedia.org/wiki/Hindley%E2%80%93Milner_type_system

Prior to this MR, a minimal type system was in place in the parser. This had its limits. Notably, when coding in the foldl expression, we had to hardcode the type. In this MR, we attempt to build something almost, but not quite, entirely unlike a Hindley-Milner typing system[1]. This also lets us get rid of all the ConstantUIn32 etc. classes. [1] https://en.wikipedia.org/wiki/Hindley%E2%80%93Milner_type_system
jbwdevries added 5 commits 2022-09-16 15:46:37 +00:00
jbwdevries self-assigned this 2022-09-16 15:46:45 +00:00
jbwdevries added 13 commits 2022-09-22 07:43:08 +00:00
bytes, static array, tuple and struct.
They are now better organized and easier to extend, I hope.
Removed the separate ModuleConstantRef since you can tell by the variable
property of VariableReference. We'll also add local variables there later
on.
Also naming fix, buildin => builtin.

Removes the use of ConstantStaticArray, as this was context dependent
Also, fix issue with f64 being parsed as f32
Author
Owner

Replaced by #4

Replaced by #4
jbwdevries closed this pull request 2023-01-07 15:31:10 +00:00
jbwdevries deleted branch milner_type_checking 2023-01-07 15:31:20 +00:00

Pull request closed

Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: jbwdevries/phasm#3
No description provided.