- forDotnet =
- case fcall of
- DNCall{} -> True
- _ -> False
-
- topConDs
- | forDotnet = Just <$> dsLookupGlobalId checkDotnetResName
- | otherwise = return Nothing
-
- augmentResultDs
- | forDotnet = do
- return (\ (mb_res_ty, resWrap) ->
- case mb_res_ty of
- Nothing -> (Just (mkTyConApp (tupleTyCon Unboxed 1)
- [ addrPrimTy ]),
- resWrap)
- Just x -> (Just (mkTyConApp (tupleTyCon Unboxed 2)
- [ x, addrPrimTy ]),
- resWrap))
- | otherwise = return id
-
- augment <- augmentResultDs
- topCon <- topConDs
- (ccall_result_ty, res_wrapper) <- boxResult augment topCon io_res_ty