readVariants8:: ArgRes a1 -> ArgRes a2 -> ArgRes a3 -> ArgRes a4 -> ArgRes a5 
                      -> ArgRes a6 -> ArgRes a7 -> ArgRes a8
                      -> VARIANT  -> IO (a1,a2,a3,a4,a5,a6,a7,a8)
readVariants8 f1 f2 f3 f4 f5 f6 f7 f8 p
      = do v8 <- f8 p
           v7 <- f7 (p `addNCastPtr` sizeofVARIANT)
           v6 <- f6 (p `addNCastPtr` (2*sizeofVARIANT))
           v5 <- f5 (p `addNCastPtr` (3*sizeofVARIANT))
           v4 <- f4 (p `addNCastPtr` (4*sizeofVARIANT))
           v3 <- f3 (p `addNCastPtr` (5*sizeofVARIANT))
           v2 <- f2 (p `addNCastPtr` (6*sizeofVARIANT))
           v1 <- f1 (p `addNCastPtr` (7*sizeofVARIANT))
           return (v1,v2,v3,v4,v5,v6,v7,v8)

{- UNUSED:
unmarshallVariantList :: [ArgRes a] -> VARIANT  -> IO [a]
unmarshallVariantList fls p = 
   (go p fls []) `always` freeMemVariants len p
  where
    len = length fls

    go p [] acc     = return acc
    go p (f:fs) acc = do
        v <- f p
        go (p `addNCastPtr` sizeofVARIANT) fs (v:acc)
-}

{-
@invokeMethod/Function@ and @propertyGet/Set@ all use the primitive
@primInvokeMethod@.
-}
readVariants8:: ArgRes a1 -> ArgRes a2 -> ArgRes a3 -> ArgRes a4 -> ArgRes a5 
                      -> ArgRes a6 -> ArgRes a7 -> ArgRes a8
                      -> VARIANT  -> IO (a1,a2,a3,a4,a5,a6,a7,a8)
readVariants8 f1 f2 f3 f4 f5 f6 f7 f8 p
      = do v8 <- f8 p
           v7 <- f7 (p `addNCastPtr` sizeofVARIANT)
           v6 <- f6 (p `addNCastPtr` (2*sizeofVARIANT))
           v5 <- f5 (p `addNCastPtr` (3*sizeofVARIANT))
           v4 <- f4 (p `addNCastPtr` (4*sizeofVARIANT))
           v3 <- f3 (p `addNCastPtr` (5*sizeofVARIANT))
           v2 <- f2 (p `addNCastPtr` (6*sizeofVARIANT))
           v1 <- f1 (p `addNCastPtr` (7*sizeofVARIANT))
           return (v1,v2,v3,v4,v5,v6,v7,v8)

{- UNUSED:
unmarshallVariantList :: [ArgRes a] -> VARIANT  -> IO [a]
unmarshallVariantList fls p = 
   (go p fls []) `always` freeMemVariants len p
  where
    len = length fls

    go p [] acc     = return acc
    go p (f:fs) acc = do
        v <- f p
        go (p `addNCastPtr` sizeofVARIANT) fs (v:acc)
-}

{-
@invokeMethod/Function@ and @propertyGet/Set@ all use the primitive
@primInvokeMethod@.
-}
readVariants8 f1 f2 f3 f4 f5 f6 f7 f8 p
      = do v8 <- f8 p
           v7 <- f7 (p `addNCastPtr` sizeofVARIANT)
           v6 <- f6 (p `addNCastPtr` (2*sizeofVARIANT))
           v5 <- f5 (p `addNCastPtr` (3*sizeofVARIANT))
           v4 <- f4 (p `addNCastPtr` (4*sizeofVARIANT))
           v3 <- f3 (p `addNCastPtr` (5*sizeofVARIANT))
           v2 <- f2 (p `addNCastPtr` (6*sizeofVARIANT))
           v1 <- f1 (p `addNCastPtr` (7*sizeofVARIANT))
           return (v1,v2,v3,v4,v5,v6,v7,v8)

{- UNUSED:
unmarshallVariantList :: [ArgRes a] -> VARIANT  -> IO [a]
unmarshallVariantList fls p = 
   (go p fls []) `always` freeMemVariants len p
  where
    len = length fls

    go p [] acc     = return acc
    go p (f:fs) acc = do
        v <- f p
        go (p `addNCastPtr` sizeofVARIANT) fs (v:acc)
-}

{-
@invokeMethod/Function@ and @propertyGet/Set@ all use the primitive
@primInvokeMethod@.
-}