type5 is much more first principles based, so we get a lot of weird quirks removed: - FromLiteral no longer needs to understand AST - Type unifications works more like Haskell - Function types are just ordinary types, saving a lot of manual busywork and more.
9 lines
195 B
Python
9 lines
195 B
Python
from typing import Callable
|
|
|
|
from .typeexpr import TypeExpr
|
|
|
|
|
|
class TypeRouter[S, R]:
|
|
def add(self, typ: TypeExpr, mtd: Callable[[S, TypeExpr], R]) -> None:
|
|
raise NotImplementedError
|