GetBuiltinFunctionType returns the type of a builtin function. The type may contain type variables.
(sym ast.FunctionSym)
| 180 | // GetBuiltinFunctionType returns the type of a builtin function. |
| 181 | // The type may contain type variables. |
| 182 | func GetBuiltinFunctionType(sym ast.FunctionSym) (ast.BaseTerm, bool) { |
| 183 | if tpe, ok := Functions[sym]; ok { |
| 184 | return tpe, true |
| 185 | } |
| 186 | if tpe, ok := Functions[ast.FunctionSym{sym.Symbol, -1}]; ok { |
| 187 | return tpe, true // variable arity |
| 188 | } |
| 189 | return nil, false |
| 190 | } |
| 191 | |
| 192 | // IsBuiltinFunction returns true if sym is a builtin function. |
| 193 | func IsBuiltinFunction(sym ast.FunctionSym) bool { |
no outgoing calls
no test coverage detected