use DoRec instead of RecursiveDo on GHC-7.4
add Factor class to Data.Polynomial