Refactor -fnewgeneric code for upstream introduction of ParMonad
in revision 6a1638c57b9c784dec60b045a5e42565743c0d20.