def typeof(obj):
    """
    Returns the type of an object within the internal type system.

    Args:
        obj: the object to inspect

    Returns:
        An object representing the type in the internal type system language
        (i.e., a TypeOperator or TypeVariable)
    """
    TypeVariable.next_var_name = 'a'

    if isinstance(obj, Hask):
        return obj.__type__()

    elif isinstance(obj, tuple):
        return Tuple(map(typeof, obj))

    elif obj is None:
        return TypeOperator(None, [])

    elif __python_function_types__ in type(obj):
        return TypeOperator(PyFunc, [])

    return TypeOperator(type(obj), [])
dataset/ETHPy150Open billpmurphy/hask/hask/lang/type_system.py/typeof/swapped operands of `in`