{-# OPTIONS_HADDOCK hide, prune, ignore-exports #-}
module Data.Number.Flint.Acb.Mat.Instances where

import System.IO.Unsafe
import Foreign.C.String
import Foreign.Marshal.Alloc ( free )

import Data.Number.Flint.Arb.Types
import Data.Number.Flint.Acb.Mat

instance Show AcbMat where
  show :: AcbMat -> String
show AcbMat
x = forall a. IO a -> a
unsafePerformIO forall a b. (a -> b) -> a -> b
$ do
    (AcbMat
_, CString
cs) <- forall {a}. AcbMat -> (Ptr CAcbMat -> IO a) -> IO (AcbMat, a)
withAcbMat AcbMat
x forall a b. (a -> b) -> a -> b
$ \Ptr CAcbMat
x -> do Ptr CAcbMat -> CLong -> ArbStrOption -> IO CString
acb_mat_get_strn Ptr CAcbMat
x CLong
16 ArbStrOption
arb_str_no_radius
    String
s <- CString -> IO String
peekCString CString
cs
    forall a. Ptr a -> IO ()
free CString
cs
    forall (m :: * -> *) a. Monad m => a -> m a
return String
s