22-- Copyright: (C) 2013 Amgen, Inc.
33--
44-- Low-level bindings to core R datatypes and functions which depend on
5- -- computing offsets of C struct field. We use hsc2hs for this purpose.
5+ -- computing offsets of C struct field.
66
77{-# LANGUAGE ConstraintKinds #-}
88{-# LANGUAGE DataKinds #-}
@@ -187,10 +187,7 @@ data SEXPInfo = SEXPInfo
187187 , infoObj :: Bool -- ^ Is this an object with a class attribute.
188188 , infoNamed :: Int -- ^ Control copying information.
189189 , infoGp :: Int -- ^ General purpose data.
190- , infoMark :: Bool -- ^ Mark object as 'in use' in GC.
191190 , infoDebug :: Bool -- ^ Debug marker.
192- , infoTrace :: Bool -- ^ Trace marker.
193- , infoSpare :: Bool -- ^ Alignment (not in use).
194191 } deriving ( Show )
195192
196193-- | Extract the header from the given 'SEXP'.
@@ -201,22 +198,16 @@ peekInfo ts =
201198 <*> ((/= 0 ) <$> cOBJECT s)
202199 <*> (fromIntegral <$> cNAMED s)
203200 <*> (fromIntegral <$> cLEVELS s)
204- <*> ((/= 0 ) <$> cMARK s)
205201 <*> ((/= 0 ) <$> cRDEBUG s)
206- <*> ((/= 0 ) <$> cRTRACE s)
207- <*> ((/= 0 ) <$> cRSTEP s)
208202 where
209203 s = unsexp ts
210204
211205-- These accessors are necessary because hsc2hs cannot determine the offset of
212- -- C struct bit-fields. https://ghc .haskell.org/trac /ghc/ticket /12149
206+ -- C struct bit-fields. https://gitlab .haskell.org/ghc /ghc/-/issues /12149
213207foreign import ccall unsafe " OBJECT" cOBJECT :: SEXP0 -> IO CInt
214208foreign import ccall unsafe " NAMED" cNAMED :: SEXP0 -> IO CInt
215209foreign import ccall unsafe " LEVELS" cLEVELS :: SEXP0 -> IO CInt
216- foreign import ccall unsafe " MARK" cMARK :: SEXP0 -> IO CInt
217210foreign import ccall unsafe " RDEBUG" cRDEBUG :: SEXP0 -> IO CInt
218- foreign import ccall unsafe " RTRACE" cRTRACE :: SEXP0 -> IO CInt
219- foreign import ccall unsafe " RSTEP" cRSTEP :: SEXP0 -> IO CInt
220211
221212-------------------------------------------------------------------------------
222213-- Attribute header --
0 commit comments