I'd like to figure out how to properly support having the set of
available primops depend on the dynamic flags before adding too much
more. I'll be speaking to Simon PJ about it tomorrow.
Could we use a fallback, like we did for e.g. popcount? I don't think have conditionally defined primops is a good idea. How would you use them in programs? You'd have to do something like:
#ifdef ???
-- use primops
#else
-- use fallback
#endif
and everyone would write their own fallback. It would be better if GHC fell back to some generic implementation.
-- Johan