Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type checker #3

Open
JonasDuregard opened this issue Mar 3, 2016 · 3 comments
Open

Type checker #3

JonasDuregard opened this issue Mar 3, 2016 · 3 comments

Comments

@JonasDuregard
Copy link

You need to add type inference and type checking to your language!

@JonasDuregard
Copy link
Author

Here is a project worth looking at:
https://github.com/mgrabmueller/AlgorithmW

@m0ar
Copy link
Owner

m0ar commented Apr 28, 2016

An update on this: currently type checking is kinda working for the core language. Checking type correctness on evaluation in loli is also added, but @lol2kpe is currently working on adding the types for the functions in sugar to the start environment (the information hidden between the lines here is that nothing evaluates before that's done 👯).

Something that confuses us is how to reach the type declaration of a method, to compare that to the inferred type of the resulting expression. I think we agree on that expanding the AST to be type annotated requires heavy lifting, maybe it's easier (albeit a bit dirty) to just stuff the type annotations somewhere reachable from TI.hs.

@JonasDuregard
Copy link
Author

I believe on the last meeting we discussed having cProgram give some kind of record type containing a list of function declarations, a list of data type declarations and a map from names to type signatures (although the last could just as easily be integrated into the function declarations).

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

No branches or pull requests

2 participants