Closed
Description
Right now it is impossible to write a code like this one:
from classes import typeclass
from typing import List
@typeclass
def some(instance) -> int:
...
@some.instance(List[int])
def _some_list_int(instance: List[int]) -> int:
...
Because, you cannot check that some variable has type List[int]
in runtime.
Maybe we can use runtime typecheckers? Like: https://github.com/erezsh/runtype
Related #8