pub fn symbol_type(&self, sym: &Symbol) -> WeldResult<&Type> {
        self.locals.get(sym).map(Ok).unwrap_or_else(|| {
            self.params
                .get(sym)
                .map(Ok)
                .unwrap_or_else(|| compile_err!("Can't find symbol {}", sym.to_string()))
        })
    }
Gets the Type for a Symbol in the function. Symbols may be either local variables or
parameters.
weld/src/sir/mod.rs