hacspec-python
hacspec-python copied to clipboard
Type checker
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.
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".
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.
Fine by me.