module Foreign.R
( module Foreign.R.Type
, SEXP(..)
, SomeSEXP(..)
, unSomeSEXP
, cast
, asTypeOf
, unsafeCoerce
, allocSEXP
, allocList
, allocVector
, allocVectorProtected
, install
, mkString
, mkChar
, CEType(..)
, mkCharCE
, mkWeakRef
, typeOf
, isS4
, setAttributes
, getAttribute
, getAttributes
, cons
, lcons
, car
, cdr
, tag
, setCar
, setCdr
, setTag
, envFrame
, envEnclosing
, envHashtab
, closureFormals
, closureBody
, closureEnv
, promiseCode
, promiseEnv
, promiseValue
, symbolPrintName
, symbolValue
, symbolInternal
, length
, trueLength
, char
, real
, integer
, logical
, complex
, raw
, string
, unsafeSEXPToVectorPtr
, unsafeVectorPtrToSEXP
, readVector
, writeVector
, eval
, tryEval
, tryEvalSilent
, lang1
, lang2
, lang3
, findFun
, findVar
, protect
, unprotect
, unprotectPtr
, preserveObject
, releaseObject
, gc
, isRInteractive
, nilValue
, unboundValue
, missingArg
, baseEnv
, emptyEnv
, globalEnv
, signalHandlers
, interruptsPending
, printValue
, SEXPInfo(..)
, peekInfo
, pokeInfo
, mark
, named
, SEXPREC
, SEXP0
, sexp
, unsexp
, release
, unsafeRelease
, withProtected
, indexVector
) where
import qualified Foreign.C.Types as C2HSImp
import qualified Foreign.Ptr as C2HSImp
import Control.Memory.Region
import Language.R.HExp (HExp)
import Foreign.R.Internal hiding (SEXP0)
import Foreign.R.Type
import Foreign.R.Type as R
import Control.Applicative
import Control.DeepSeq (NFData(..))
import Control.Exception (bracket)
import Control.Monad.Primitive ( unsafeInlineIO )
import Data.Bits
import Data.Complex
import Data.Int (Int32)
import Data.Singletons (fromSing)
import Foreign (Ptr, castPtr, plusPtr, Storable(..))
import Foreign.C
import Prelude hiding (asTypeOf, length)
type SEXP0 = C2HSImp.Ptr (SEXPREC)
car :: (SEXP s a) -> IO ((SomeSEXP s))
car a1 =
let {a1' = unsexp a1} in
car'_ a1' >>= \res ->
let {res' = somesexp res} in
return (res')
cdr :: (SEXP s a) -> IO ((SomeSEXP s))
cdr a1 =
let {a1' = unsexp a1} in
cdr'_ a1' >>= \res ->
let {res' = somesexp res} in
return (res')
tag :: (SEXP s a) -> IO ((SomeSEXP s))
tag a1 =
let {a1' = unsexp a1} in
tag'_ a1' >>= \res ->
let {res' = somesexp res} in
return (res')
envFrame :: (SEXP s R.Env) -> IO ((SEXP s R.PairList))
envFrame a1 =
let {a1' = unsexp a1} in
envFrame'_ a1' >>= \res ->
let {res' = sexp res} in
return (res')
envEnclosing :: (SEXP s R.Env) -> IO ((SEXP s R.Env))
envEnclosing a1 =
let {a1' = unsexp a1} in
envEnclosing'_ a1' >>= \res ->
let {res' = sexp res} in
return (res')
envHashtab :: (SEXP s R.Env) -> IO ((SEXP s R.Vector))
envHashtab a1 =
let {a1' = unsexp a1} in
envHashtab'_ a1' >>= \res ->
let {res' = sexp res} in
return (res')
closureFormals :: (SEXP s R.Closure) -> IO ((SEXP s R.PairList))
closureFormals a1 =
let {a1' = unsexp a1} in
closureFormals'_ a1' >>= \res ->
let {res' = sexp res} in
return (res')
closureBody :: (SEXP s R.Closure) -> IO ((SomeSEXP s))
closureBody a1 =
let {a1' = unsexp a1} in
closureBody'_ a1' >>= \res ->
let {res' = somesexp res} in
return (res')
closureEnv :: (SEXP s R.Closure) -> IO ((SEXP s R.Env))
closureEnv a1 =
let {a1' = unsexp a1} in
closureEnv'_ a1' >>= \res ->
let {res' = sexp res} in
return (res')
promiseCode :: (SEXP s R.Promise) -> IO ((SomeSEXP s))
promiseCode a1 =
let {a1' = unsexp a1} in
promiseCode'_ a1' >>= \res ->
let {res' = somesexp res} in
return (res')
promiseEnv :: (SEXP s R.Promise) -> IO ((SEXP s R.Env))
promiseEnv a1 =
let {a1' = unsexp a1} in
promiseEnv'_ a1' >>= \res ->
let {res' = sexp res} in
return (res')
promiseValue :: (SEXP s R.Promise) -> IO ((SomeSEXP s))
promiseValue a1 =
let {a1' = unsexp a1} in
promiseValue'_ a1' >>= \res ->
let {res' = somesexp res} in
return (res')
trueLength :: R.IsVector a => (SEXP s a) -> IO ((CInt))
trueLength a1 =
let {a1' = unsexp a1} in
trueLength'_ a1' >>= \res ->
let {res' = id res} in
return (res')
char :: (SEXP s R.Char) -> IO ((CString))
char a1 =
let {a1' = unsexp a1} in
char'_ a1' >>= \res ->
let {res' = id res} in
return (res')
real :: (SEXP s R.Real) -> IO ((Ptr Double))
real a1 =
let {a1' = unsexp a1} in
real'_ a1' >>= \res ->
let {res' = castPtr res} in
return (res')
integer :: (SEXP s R.Int) -> IO ((Ptr Int32))
integer a1 =
let {a1' = unsexp a1} in
integer'_ a1' >>= \res ->
let {res' = castPtr res} in
return (res')
raw :: (SEXP s R.Raw) -> IO ((Ptr CChar))
raw a1 =
let {a1' = unsexp a1} in
raw'_ a1' >>= \res ->
let {res' = castPtr res} in
return (res')
type RLogical = 'R.Logical
logical :: (SEXP s RLogical) -> IO ((Ptr R.Logical))
logical a1 =
let {a1' = unsexp a1} in
logical'_ a1' >>= \res ->
let {res' = castPtr res} in
return (res')
complex :: (SEXP s R.Complex) -> IO ((Ptr (Complex Double)))
complex a1 =
let {a1' = unsexp a1} in
complex'_ a1' >>= \res ->
let {res' = castPtr res} in
return (res')
string :: (SEXP s R.String) -> IO ((Ptr (SEXP s R.Char)))
string a1 =
let {a1' = unsexp a1} in
string'_ a1' >>= \res ->
let {res' = castPtr res} in
return (res')
readVector :: R.IsGenericVector a => (SEXP s a) -> (Int) -> IO ((SomeSEXP s))
readVector a1 a2 =
let {a1' = unsexp a1} in
let {a2' = fromIntegral a2} in
readVector'_ a1' a2' >>= \res ->
let {res' = somesexp res} in
return (res')
indexVector :: IsGenericVector a => SEXP s a -> Int -> IO (SomeSEXP s)
indexVector = readVector
writeVector :: R.IsGenericVector a => (SEXP s a) -> (Int) -> (SEXP s b) -> IO ((SEXP s a))
writeVector a1 a2 a3 =
let {a1' = unsexp a1} in
let {a2' = fromIntegral a2} in
let {a3' = unsexp a3} in
writeVector'_ a1' a2' a3' >>= \res ->
let {res' = sexp res} in
return (res')
symbolPrintName :: (SEXP s R.Symbol) -> IO ((SEXP s R.Char))
symbolPrintName a1 =
let {a1' = unsexp a1} in
symbolPrintName'_ a1' >>= \res ->
let {res' = sexp res} in
return (res')
symbolValue :: (SEXP s R.Symbol) -> IO ((SEXP s a))
symbolValue a1 =
let {a1' = unsexp a1} in
symbolValue'_ a1' >>= \res ->
let {res' = sexp res} in
return (res')
symbolInternal :: (SEXP s R.Symbol) -> IO ((SEXP s a))
symbolInternal a1 =
let {a1' = unsexp a1} in
symbolInternal'_ a1' >>= \res ->
let {res' = sexp res} in
return (res')
mkString :: (CString) -> IO ((SEXP V R.String))
mkString a1 =
let {a1' = id a1} in
mkString'_ a1' >>= \res ->
let {res' = sexp res} in
return (res')
mkChar :: (CString) -> IO ((SEXP V R.Char))
mkChar a1 =
let {a1' = id a1} in
mkChar'_ a1' >>= \res ->
let {res' = sexp res} in
return (res')
mkCharCE_ :: (CString) -> (CEType) -> IO ((SEXP V R.Char))
mkCharCE_ a1 a2 =
let {a1' = id a1} in
let {a2' = cIntFromEnum a2} in
mkCharCE_'_ a1' a2' >>= \res ->
let {res' = sexp res} in
return (res')
mkCharCE :: CEType -> CString -> IO (SEXP V R.Char)
mkCharCE = flip mkCharCE_
install :: (CString) -> IO ((SEXP V R.Symbol))
install a1 =
let {a1' = id a1} in
install'_ a1' >>= \res ->
let {res' = sexp res} in
return (res')
allocSEXP :: (SSEXPTYPE a) -> IO ((SEXP V a))
allocSEXP a1 =
let {a1' = cUIntFromSingEnum a1} in
allocSEXP'_ a1' >>= \res ->
let {res' = sexp res} in
return (res')
allocList :: (Int) -> IO ((SEXP V R.List))
allocList a1 =
let {a1' = fromIntegral a1} in
allocList'_ a1' >>= \res ->
let {res' = sexp res} in
return (res')
allocVector :: R.IsVector a => (SSEXPTYPE a) -> (Int) -> IO ((SEXP V a))
allocVector a1 a2 =
let {a1' = cUIntFromSingEnum a1} in
let {a2' = fromIntegral a2} in
allocVector'_ a1' a2' >>= \res ->
let {res' = sexp res} in
return (res')
allocVectorProtected :: (R.IsVector a) => SSEXPTYPE a -> Int -> IO (SEXP s a)
allocVectorProtected ty n = fmap release (protect =<< allocVector ty n)
cons :: (SEXP s a) -> (SEXP s b) -> IO ((SEXP V R.List))
cons a1 a2 =
let {a1' = unsexp a1} in
let {a2' = unsexp a2} in
cons'_ a1' a2' >>= \res ->
let {res' = sexp res} in
return (res')
lcons :: (SEXP s a) -> (SEXP s b) -> IO ((SEXP V R.Lang))
lcons a1 a2 =
let {a1' = unsexp a1} in
let {a2' = unsexp a2} in
lcons'_ a1' a2' >>= \res ->
let {res' = sexp res} in
return (res')
printValue :: (SEXP s a) -> IO ()
printValue a1 =
let {a1' = unsexp a1} in
printValue'_ a1' >>
return ()
protect :: (SEXP s a) -> IO ((SEXP G a))
protect a1 =
let {a1' = unsexp a1} in
protect'_ a1' >>= \res ->
let {res' = sexp res} in
return (res')
unprotect :: (Int) -> IO ()
unprotect a1 =
let {a1' = fromIntegral a1} in
unprotect'_ a1' >>
return ()
unprotectPtr :: (SEXP G a) -> IO ()
unprotectPtr a1 =
let {a1' = unsexp a1} in
unprotectPtr'_ a1' >>
return ()
gc :: IO ()
gc =
gc'_ >>
return ()
preserveObject :: (SEXP s a) -> IO ()
preserveObject a1 =
let {a1' = unsexp a1} in
preserveObject'_ a1' >>
return ()
releaseObject :: (SEXP s a) -> IO ()
releaseObject a1 =
let {a1' = unsexp a1} in
releaseObject'_ a1' >>
return ()
eval :: (SEXP s a) -> (SEXP s R.Env) -> IO ((SomeSEXP V))
eval a1 a2 =
let {a1' = unsexp a1} in
let {a2' = unsexp a2} in
eval'_ a1' a2' >>= \res ->
let {res' = somesexp res} in
return (res')
tryEval :: (SEXP s a) -> (SEXP s R.Env) -> (Ptr CInt) -> IO ((SomeSEXP V))
tryEval a1 a2 a3 =
let {a1' = unsexp a1} in
let {a2' = unsexp a2} in
let {a3' = id a3} in
tryEval'_ a1' a2' a3' >>= \res ->
let {res' = somesexp res} in
return (res')
tryEvalSilent :: (SEXP s a) -> (SEXP s R.Env) -> (Ptr CInt) -> IO ((SomeSEXP V))
tryEvalSilent a1 a2 a3 =
let {a1' = unsexp a1} in
let {a2' = unsexp a2} in
let {a3' = id a3} in
tryEvalSilent'_ a1' a2' a3' >>= \res ->
let {res' = somesexp res} in
return (res')
lang1 :: (SEXP s a) -> IO ((SEXP V R.Lang))
lang1 a1 =
let {a1' = unsexp a1} in
lang1'_ a1' >>= \res ->
let {res' = sexp res} in
return (res')
lang2 :: (SEXP s a) -> (SEXP s b) -> IO ((SEXP V R.Lang))
lang2 a1 a2 =
let {a1' = unsexp a1} in
let {a2' = unsexp a2} in
lang2'_ a1' a2' >>= \res ->
let {res' = sexp res} in
return (res')
lang3 :: (SEXP s a) -> (SEXP s b) -> (SEXP s c) -> IO ((SEXP V R.Lang))
lang3 a1 a2 a3 =
let {a1' = unsexp a1} in
let {a2' = unsexp a2} in
let {a3' = unsexp a3} in
lang3'_ a1' a2' a3' >>= \res ->
let {res' = sexp res} in
return (res')
findFun :: (SEXP s a) -> (SEXP s R.Env) -> IO ((SomeSEXP s))
findFun a1 a2 =
let {a1' = unsexp a1} in
let {a2' = unsexp a2} in
findFun'_ a1' a2' >>= \res ->
let {res' = somesexp res} in
return (res')
findVar :: (SEXP s a) -> (SEXP s R.Env) -> IO ((SEXP s R.Symbol))
findVar a1 a2 =
let {a1' = unsexp a1} in
let {a2' = unsexp a2} in
findVar'_ a1' a2' >>= \res ->
let {res' = sexp res} in
return (res')
mkWeakRef :: (SEXP s a) -> (SEXP s b) -> (SEXP s c) -> (Bool) -> IO ((SEXP V R.WeakRef))
mkWeakRef a1 a2 a3 a4 =
let {a1' = unsexp a1} in
let {a2' = unsexp a2} in
let {a3' = unsexp a3} in
let {a4' = cIntFromEnum a4} in
mkWeakRef'_ a1' a2' a3' a4' >>= \res ->
let {res' = sexp res} in
return (res')
data CEType = CE_NATIVE
| CE_UTF8
| CE_LATIN1
| CE_BYTES
| CE_SYMBOL
| CE_ANY
deriving (Eq,Show)
instance Enum CEType where
succ CE_NATIVE = CE_UTF8
succ CE_UTF8 = CE_LATIN1
succ CE_LATIN1 = CE_BYTES
succ CE_BYTES = CE_SYMBOL
succ CE_SYMBOL = CE_ANY
succ CE_ANY = error "CEType.succ: CE_ANY has no successor"
pred CE_UTF8 = CE_NATIVE
pred CE_LATIN1 = CE_UTF8
pred CE_BYTES = CE_LATIN1
pred CE_SYMBOL = CE_BYTES
pred CE_ANY = CE_SYMBOL
pred CE_NATIVE = error "CEType.pred: CE_NATIVE has no predecessor"
enumFromTo from to = go from
where
end = fromEnum to
go v = case compare (fromEnum v) end of
LT -> v : go (succ v)
EQ -> [v]
GT -> []
enumFrom from = enumFromTo from CE_ANY
fromEnum CE_NATIVE = 0
fromEnum CE_UTF8 = 1
fromEnum CE_LATIN1 = 2
fromEnum CE_BYTES = 3
fromEnum CE_SYMBOL = 5
fromEnum CE_ANY = 99
toEnum 0 = CE_NATIVE
toEnum 1 = CE_UTF8
toEnum 2 = CE_LATIN1
toEnum 3 = CE_BYTES
toEnum 5 = CE_SYMBOL
toEnum 99 = CE_ANY
toEnum unmatched = error ("CEType.toEnum: Cannot match " ++ show unmatched)
withProtected :: IO (SEXP V a)
-> (SEXP s a -> IO b)
-> IO b
withProtected create f =
bracket
(do { x <- create; _ <- protect x; return x })
(const $ unprotect 1)
(f . unsafeRelease)
foreign import ccall safe "Foreign/R.chs.h CAR"
car'_ :: ((SEXP0) -> (IO (SEXP0)))
foreign import ccall safe "Foreign/R.chs.h CDR"
cdr'_ :: ((SEXP0) -> (IO (SEXP0)))
foreign import ccall safe "Foreign/R.chs.h TAG"
tag'_ :: ((SEXP0) -> (IO (SEXP0)))
foreign import ccall safe "Foreign/R.chs.h FRAME"
envFrame'_ :: ((SEXP0) -> (IO (SEXP0)))
foreign import ccall safe "Foreign/R.chs.h ENCLOS"
envEnclosing'_ :: ((SEXP0) -> (IO (SEXP0)))
foreign import ccall safe "Foreign/R.chs.h HASHTAB"
envHashtab'_ :: ((SEXP0) -> (IO (SEXP0)))
foreign import ccall safe "Foreign/R.chs.h FORMALS"
closureFormals'_ :: ((SEXP0) -> (IO (SEXP0)))
foreign import ccall safe "Foreign/R.chs.h BODY"
closureBody'_ :: ((SEXP0) -> (IO (SEXP0)))
foreign import ccall safe "Foreign/R.chs.h CLOENV"
closureEnv'_ :: ((SEXP0) -> (IO (SEXP0)))
foreign import ccall safe "Foreign/R.chs.h PRCODE"
promiseCode'_ :: ((SEXP0) -> (IO (SEXP0)))
foreign import ccall safe "Foreign/R.chs.h PRENV"
promiseEnv'_ :: ((SEXP0) -> (IO (SEXP0)))
foreign import ccall safe "Foreign/R.chs.h PRVALUE"
promiseValue'_ :: ((SEXP0) -> (IO (SEXP0)))
foreign import ccall safe "Foreign/R.chs.h TRUELENGTH"
trueLength'_ :: ((SEXP0) -> (IO C2HSImp.CInt))
foreign import ccall safe "Foreign/R.chs.h R_CHAR"
char'_ :: ((SEXP0) -> (IO (C2HSImp.Ptr C2HSImp.CChar)))
foreign import ccall safe "Foreign/R.chs.h REAL"
real'_ :: ((SEXP0) -> (IO (C2HSImp.Ptr C2HSImp.CDouble)))
foreign import ccall unsafe "Foreign/R.chs.h INTEGER"
integer'_ :: ((SEXP0) -> (IO (C2HSImp.Ptr C2HSImp.CInt)))
foreign import ccall safe "Foreign/R.chs.h RAW"
raw'_ :: ((SEXP0) -> (IO (C2HSImp.Ptr C2HSImp.CUChar)))
foreign import ccall safe "Foreign/R.chs.h LOGICAL"
logical'_ :: ((SEXP0) -> (IO (C2HSImp.Ptr C2HSImp.CInt)))
foreign import ccall safe "Foreign/R.chs.h COMPLEX"
complex'_ :: ((SEXP0) -> (IO (C2HSImp.Ptr ())))
foreign import ccall safe "Foreign/R.chs.h STRING_PTR"
string'_ :: ((SEXP0) -> (IO (C2HSImp.Ptr (SEXP0))))
foreign import ccall safe "Foreign/R.chs.h VECTOR_ELT"
readVector'_ :: ((SEXP0) -> (C2HSImp.CLong -> (IO (SEXP0))))
foreign import ccall safe "Foreign/R.chs.h SET_VECTOR_ELT"
writeVector'_ :: ((SEXP0) -> (C2HSImp.CLong -> ((SEXP0) -> (IO (SEXP0)))))
foreign import ccall safe "Foreign/R.chs.h PRINTNAME"
symbolPrintName'_ :: ((SEXP0) -> (IO (SEXP0)))
foreign import ccall safe "Foreign/R.chs.h SYMVALUE"
symbolValue'_ :: ((SEXP0) -> (IO (SEXP0)))
foreign import ccall safe "Foreign/R.chs.h INTERNAL"
symbolInternal'_ :: ((SEXP0) -> (IO (SEXP0)))
foreign import ccall safe "Foreign/R.chs.h Rf_mkString"
mkString'_ :: ((C2HSImp.Ptr C2HSImp.CChar) -> (IO (SEXP0)))
foreign import ccall safe "Foreign/R.chs.h Rf_mkChar"
mkChar'_ :: ((C2HSImp.Ptr C2HSImp.CChar) -> (IO (SEXP0)))
foreign import ccall safe "Foreign/R.chs.h Rf_mkCharCE"
mkCharCE_'_ :: ((C2HSImp.Ptr C2HSImp.CChar) -> (C2HSImp.CInt -> (IO (SEXP0))))
foreign import ccall safe "Foreign/R.chs.h Rf_install"
install'_ :: ((C2HSImp.Ptr C2HSImp.CChar) -> (IO (SEXP0)))
foreign import ccall safe "Foreign/R.chs.h Rf_allocSExp"
allocSEXP'_ :: (C2HSImp.CUInt -> (IO (SEXP0)))
foreign import ccall safe "Foreign/R.chs.h Rf_allocList"
allocList'_ :: (C2HSImp.CInt -> (IO (SEXP0)))
foreign import ccall safe "Foreign/R.chs.h Rf_allocVector"
allocVector'_ :: (C2HSImp.CUInt -> (C2HSImp.CLong -> (IO (SEXP0))))
foreign import ccall safe "Foreign/R.chs.h Rf_cons"
cons'_ :: ((SEXP0) -> ((SEXP0) -> (IO (SEXP0))))
foreign import ccall safe "Foreign/R.chs.h Rf_lcons"
lcons'_ :: ((SEXP0) -> ((SEXP0) -> (IO (SEXP0))))
foreign import ccall safe "Foreign/R.chs.h Rf_PrintValue"
printValue'_ :: ((SEXP0) -> (IO ()))
foreign import ccall safe "Foreign/R.chs.h Rf_protect"
protect'_ :: ((SEXP0) -> (IO (SEXP0)))
foreign import ccall safe "Foreign/R.chs.h Rf_unprotect"
unprotect'_ :: (C2HSImp.CInt -> (IO ()))
foreign import ccall safe "Foreign/R.chs.h Rf_unprotect_ptr"
unprotectPtr'_ :: ((SEXP0) -> (IO ()))
foreign import ccall safe "Foreign/R.chs.h R_gc"
gc'_ :: (IO ())
foreign import ccall safe "Foreign/R.chs.h R_PreserveObject"
preserveObject'_ :: ((SEXP0) -> (IO ()))
foreign import ccall safe "Foreign/R.chs.h R_ReleaseObject"
releaseObject'_ :: ((SEXP0) -> (IO ()))
foreign import ccall safe "Foreign/R.chs.h Rf_eval"
eval'_ :: ((SEXP0) -> ((SEXP0) -> (IO (SEXP0))))
foreign import ccall safe "Foreign/R.chs.h R_tryEval"
tryEval'_ :: ((SEXP0) -> ((SEXP0) -> ((C2HSImp.Ptr C2HSImp.CInt) -> (IO (SEXP0)))))
foreign import ccall safe "Foreign/R.chs.h R_tryEvalSilent"
tryEvalSilent'_ :: ((SEXP0) -> ((SEXP0) -> ((C2HSImp.Ptr C2HSImp.CInt) -> (IO (SEXP0)))))
foreign import ccall safe "Foreign/R.chs.h Rf_lang1"
lang1'_ :: ((SEXP0) -> (IO (SEXP0)))
foreign import ccall safe "Foreign/R.chs.h Rf_lang2"
lang2'_ :: ((SEXP0) -> ((SEXP0) -> (IO (SEXP0))))
foreign import ccall safe "Foreign/R.chs.h Rf_lang3"
lang3'_ :: ((SEXP0) -> ((SEXP0) -> ((SEXP0) -> (IO (SEXP0)))))
foreign import ccall safe "Foreign/R.chs.h Rf_findFun"
findFun'_ :: ((SEXP0) -> ((SEXP0) -> (IO (SEXP0))))
foreign import ccall safe "Foreign/R.chs.h Rf_findVar"
findVar'_ :: ((SEXP0) -> ((SEXP0) -> (IO (SEXP0))))
foreign import ccall safe "Foreign/R.chs.h R_MakeWeakRef"
mkWeakRef'_ :: ((SEXP0) -> ((SEXP0) -> ((SEXP0) -> (C2HSImp.CInt -> (IO (SEXP0))))))