extractPTermNames (PRewrite _ _ a b m) | Just c <- m =
                                       concatMap extract [a, b, c]
extractPTermNames (PRewrite _ _ a b m) | Just c <- m =
                                       concatMap extract [a, b, c]
extractPTermNames (PRewrite _ _ a b m) | Just c <- m =
                                       concatMap extract [a, b, c]