Skip to content

Play with type systems#3

Open
Quincunx271 wants to merge 16 commits into
mainfrom
type-system
Open

Play with type systems#3
Quincunx271 wants to merge 16 commits into
mainfrom
type-system

Conversation

@Quincunx271
Copy link
Copy Markdown
Owner

No description provided.

This doesn't work yet, but I want to have a working debugger first.
With the way the grammar is currently set up, we can't move the
`ident ( args )` to be `( ident args )`. That might be okay.

We'll probably want to fix this, though: it's helpful to have a state
transition that tells the systems "actually this is a function call"
before we have to decide whether to try to push `ident`'s double value
or otherwise call it.
Turns out I didn't need this, but let's keep it anyway.
This is an interpreter, not a compiler.
Unsure if "IR" is the correct term. The idea is to model computation as
a register machine.

I think the type system can similarly be built as a register machine,
with instructions to (algebraically) compose types, e.g. by doing loose
sum and products, with other operations to ascribe field names / proper
names or formalize as an actual type vs. just a "temporary" type.
`return N` -> `return %rN`
Need to allow declaring variables of a specific type.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant