# Copyright (C) 2022 Exaloop Inc. <https://exaloop.io>

@__internal__
class __internal__:
    pass

@tuple
@__internal__
class bool:
    pass

@tuple
@__internal__
class byte:
    pass

@tuple
@__internal__
class int:
    MAX = 9223372036854775807
    pass

@tuple
@__internal__
class float:
    MIN_10_EXP = -307
    pass

@tuple
@__internal__
class float32:
    MIN_10_EXP = -37
    pass

@tuple
@__internal__
class NoneType:
    pass

@tuple
@__internal__
class type:
    pass

@tuple
@__internal__
class Function[T, TR]:
    pass

@tuple
@__internal__
class Callable[T, TR]:
    pass

@tuple
@__internal__
class Ptr[T]:
    pass
cobj = Ptr[byte]

@tuple
@__internal__
class Generator[T]:
    pass

@tuple
@__internal__
class Optional:
    T: type = NoneType

@tuple
@__internal__
class Int[N: Static[int]]:
    pass

@tuple
@__internal__
class UInt[N: Static[int]]:
    pass

@__internal__
class pyobj:
    p: Ptr[byte]

@tuple
@__internal__
class str:
    ptr: Ptr[byte]
    len: int

@tuple
@__internal__
class Array:
    len: int
    ptr: Ptr[T]
    T: type

@extend
class type:
    def __new__(obj):
        pass
function = Function

@__internal__
class Ref[T]:
    pass

@__internal__
@tuple
class Union[TU]:
    pass

# dummy
@__internal__
class TypeVar[T]: pass
@__internal__
class ByVal: pass
@__internal__
class ByRef: pass
@__internal__
class Tuple: pass

@__internal__
class ClassVar[T]:
    pass

@__internal__
@tuple
class CVar[T]:
    def __new__(name: Static[str]) -> T:
        return T()

@tuple
@__internal__
class __array__:
    T: type
    def __new__(sz: Static[int]) -> Array[T]:
        pass

def __ptr__(var):
    pass

def staticlen(obj):
    pass

def compile_error(msg: Static[str]):
    pass

def isinstance(obj, what):
    pass

@__attribute__
def overload():
    pass

def hasattr(obj, attr: Static[str], *args):
    """Special handling"""
    pass

@overload
def hasattr(obj, attr: Static[str]):
    pass

def getattr(obj, attr: Static[str]):
    pass

def tuple(iterable):
    pass

def super():
    pass

def superf(*args):
    """Special handling"""
    pass

def __realized__(fn, args):
    pass

def statictuple(*args):
    return args

def __static_print__(*args):
    pass
