Add support for primitive functions