Currently applyPAP handles too few args, sometimes causing it to return NULL for functions with big arities such as the ones generated when a function has many constraints, eg. derived instances for records with lots of fields.
Immediate solution will be to add more cases to applyPAP, which should be done anyways, but long term solution would be to pack all instance dictionaries in a struct as first param in order to save lots of args and making most functions use only a few args.
Currently applyPAP handles too few args, sometimes causing it to return NULL for functions with big arities such as the ones generated when a function has many constraints, eg. derived instances for records with lots of fields.
Immediate solution will be to add more cases to applyPAP, which should be done anyways, but long term solution would be to pack all instance dictionaries in a struct as first param in order to save lots of args and making most functions use only a few args.