--------------------------------------------------------------------------------
-- conversion
--------------------------------------------------------------------------------

fromFMPZ :: FMPZ -> FMPZPoly
fromFMPZ a = unsafePerformIO $
  withNewFMPZPoly_ $ \bptr ->
  withFMPZ_ a      $ \aptr ->
  fmpz_poly_set_fmpz bptr aptr
fromFMPZ :: FMPZ -> FMPZPoly
fromFMPZ a = unsafePerformIO $
  withNewFMPZPoly_ $ \bptr ->
  withFMPZ_ a      $ \aptr ->
  fmpz_poly_set_fmpz bptr aptr
fromFMPZ a = unsafePerformIO $
  withNewFMPZPoly_ $ \bptr ->
  withFMPZ_ a      $ \aptr ->
  fmpz_poly_set_fmpz bptr aptr