---
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
from __future__ import annotations
|
||||
from dataclasses import dataclass
|
||||
|
||||
class Int:
|
||||
pass
|
||||
|
||||
class Bool:
|
||||
pass
|
||||
|
||||
class Unit:
|
||||
pass
|
||||
|
||||
Int_Instance = Int()
|
||||
Bool_Instance = Bool()
|
||||
Unit_Instance = Unit()
|
||||
|
||||
class Any(Int, Bool, Unit):
|
||||
pass
|
||||
|
||||
Any_Instance = Any()
|
||||
|
||||
type Type = Int | Bool | Unit | FunType
|
||||
|
||||
ParamsType = Type | list[Type | list['ParamsType']]
|
||||
|
||||
@dataclass
|
||||
class FunType:
|
||||
params: ParamsType
|
||||
result: Type
|
||||
Reference in New Issue
Block a user