src/basilisp/lang/runtime.py
def resolve_alias(s: sym.Symbol, ns: Optional[Namespace] = None) -> sym.Symbol:
    """Resolve the aliased symbol in the current namespace."""
    if s in _SPECIAL_FORMS:
        return s

    ns = Maybe(ns).or_else(get_current_ns)
    if s.ns is not None:
        aliased_ns = ns.get_alias(sym.symbol(s.ns))
        if aliased_ns is not None:
            return sym.symbol(s.name, aliased_ns.name)
        else:
            return s
    else:
        which_var = ns.find(sym.symbol(s.name))
        if which_var is not None:
            return sym.symbol(which_var.name.name, which_var.ns.name)
        else:
            return sym.symbol(s.name, ns=ns.name)
def resolve_alias(s: sym.Symbol, ns: Optional[Namespace] = None) -> sym.Symbol:
    if s in _SPECIAL_FORMS:
        return s

    ns = Maybe(ns).or_else(get_current_ns)
    if s.ns is not None:
        aliased_ns = ns.get_alias(sym.symbol(s.ns))
        if aliased_ns is not None:
            return sym.symbol(s.name, aliased_ns.name)
        else:
            return s
    else:
        which_var = ns.find(sym.symbol(s.name))
        if which_var is not None:
            return sym.symbol(which_var.name.name, which_var.ns.name)
        else:
            return sym.symbol(s.name, ns=ns.name)
def resolve_alias ( s : sym . Symbol , ns : Optional [ Namespace ] = None ) -> sym . Symbol : if s in _SPECIAL_FORMS : return s ns = Maybe ( ns ) . or_else ( get_current_ns ) if s . ns is not None : aliased_ns = ns . get_alias ( sym . symbol ( s . ns ) ) if aliased_ns is not None : return sym . symbol ( s . name , aliased_ns . name ) else : return s else : which_var = ns . find ( sym . symbol ( s . name ) ) if which_var is not None : return sym . symbol ( which_var . name . name , which_var . ns . name ) else : return sym . symbol ( s . name , ns = ns . name )
Resolve the aliased symbol in the current namespace.
Resolve the aliased symbol in the current namespace .