 TYP: some (mainly primative) types for core.generic
mypy 0.750 has an experimental feature for static inference of annotations see https://mypy.readthedocs.io/en/latest/mypy_daemon.html#static-inference-of-annotations

have tried it out on functions in core.generic. The annotations add here are mainly the ones that matched the docstrings.

Question about bool vs bool_t consistency, not a blocker, otherwise LGTM thanks @simonjayhawkins happy to address the bool/bool_t issue later; we should likely just standardize on bool_t no?