# Path: pyrser/error.py
# class LocationInfo:
# class Notification:
# class Diagnostic(Exception):
#     def __init__(self, filepath: str, line: int, col: int, size: int=1):
#     def from_stream(stream: 'Stream', is_error=False) -> 'LocationInfo':
#     def from_maxstream(stream: 'Stream', is_error=False) -> 'LocationInfo':
#     def from_here(pos=1):
#     def get_content(self) -> str:
#     def __init__(self, severity: Severity, msg: str,
#                  location: LocationInfo=None, details: str=None):
#     def get_content(self, with_locinfos=False, with_details=False) -> str:
#     def __init__(self):
#     def __bool__(self):
#     def __str__(self) -> str:
#     def notify(self, severity: Severity, msg: str,
#                location: LocationInfo=None, details: str=None) -> int:
#     def add(self, n: Notification) -> int:
#     def get_content(self, with_locinfos=True, with_details=False) -> str:
#     def get_infos(self) -> {Severity, int}:
#     def have_errors(self) -> bool:


from collections import *
from pyrser.type_system.fun import *
from pyrser import error
        import pyrser.type_system.to_fmt
        import pyrser.type_system.to_fmt
        import pyrser.type_system.to_fmt


# for type translation
class Translator:
    """
    Handle conversion from type_source to type_target thru a function.
    Do error.Notification if applyiable.
    """

    def __str__(self) -> str:
        return str(self.to_fmt())


# Path: pyrser/error.py
# class LocationInfo:
# class Notification:
# class Diagnostic(Exception):
#     def __init__(self, filepath: str, line: int, col: int, size: int=1):
#     def from_stream(stream: 'Stream', is_error=False) -> 'LocationInfo':
#     def from_maxstream(stream: 'Stream', is_error=False) -> 'LocationInfo':
#     def from_here(pos=1):
#     def get_content(self) -> str:
#     def __init__(self, severity: Severity, msg: str,
#                  location: LocationInfo=None, details: str=None):
#     def get_content(self, with_locinfos=False, with_details=False) -> str:
#     def __init__(self):
#     def __bool__(self):
#     def __str__(self) -> str:
#     def notify(self, severity: Severity, msg: str,
#                location: LocationInfo=None, details: str=None) -> int:
#     def add(self, n: Notification) -> int:
#     def get_content(self, with_locinfos=True, with_details=False) -> str:
#     def get_infos(self) -> {Severity, int}:
#     def have_errors(self) -> bool:


# Path: pyrser/type_system/translator.py
from collections import *
from pyrser.type_system.fun import *
from pyrser import error
        import pyrser.type_system.to_fmt
        import pyrser.type_system.to_fmt
        import pyrser.type_system.to_fmt



# for type translation
class Translator:
    """
    Handle conversion from type_source to type_target thru a function.
    Do error.Notification if applyiable.
    """

    def __str__(self) -> str:
        return str(self.to_fmt())


    def __init__(self, fun: Fun, notify: error.Notification=None):