hacspec / hacspec-python

Please check out https://github.com/hacspec/hacspec for more information on hacspec
https://hacs-workshop.github.io/hacspec/
46 stars 8 forks source link

Type checker #10

Open franziskuskiefer opened 6 years ago

franziskuskiefer commented 6 years ago

To make sure that hacspecs are properly typed we need a way to type check specs. We started out using mypy but it turns out it doesn't support everything we need without modification. Instead of using a separate type checker the spec checker (issue #9) could also check types.

strub commented 6 years ago

The OCaml checker is going to come with a type-checker (it is more or less done).

We need a way to provide types for functions coming from "imports".

franziskuskiefer commented 6 years ago

We need a way to provide types for functions coming from "imports".

I thought about that yesterday and I think we shouldn't allow any imports other than local files (which need to be typed) and speclib.py, which is typed as well. This means we have to extend speclib with everything useful (like wots uses math.ceil and math.log). But then this shouldn't be an issue.

strub commented 6 years ago

Fine by me.