ghc-9.10.1: The GHC API
Safe HaskellNone
LanguageGHC2021

GHC.Types.ForeignCall

Synopsis

Documentation

newtype ForeignCall Source #

Constructors

CCall CCallSpec 

Instances

Instances details
Binary ForeignCall Source # 
Instance details

Defined in GHC.Types.ForeignCall

Outputable ForeignCall Source # 
Instance details

Defined in GHC.Types.ForeignCall

Methods

ppr :: ForeignCall -> SDoc Source #

Eq ForeignCall Source # 
Instance details

Defined in GHC.Types.ForeignCall

data Safety Source #

Constructors

PlaySafe

Might invoke Haskell GC, or do a call back, or switch threads, etc. So make sure things are tidy before the call. Additionally, in the threaded RTS we arrange for the external call to be executed by a separate OS thread, i.e., _concurrently_ to the execution of other Haskell threads.

PlayInterruptible

Like PlaySafe, but additionally the worker thread running this foreign call may be unceremoniously killed, so it must be scheduled on an unbound thread.

PlayRisky

None of the above can happen; the call will return without interacting with the runtime system at all. Specifically:

  • No GC
  • No call backs
  • No blocking
  • No precise exceptions

Instances

Instances details
Binary Safety Source # 
Instance details

Defined in GHC.Types.ForeignCall

Outputable Safety Source # 
Instance details

Defined in GHC.Types.ForeignCall

Methods

ppr :: Safety -> SDoc Source #

Data Safety Source # 
Instance details

Defined in GHC.Types.ForeignCall

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Safety -> c Safety #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Safety #

toConstr :: Safety -> Constr #

dataTypeOf :: Safety -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Safety) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Safety) #

gmapT :: (forall b. Data b => b -> b) -> Safety -> Safety #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Safety -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Safety -> r #

gmapQ :: (forall d. Data d => d -> u) -> Safety -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Safety -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Safety -> m Safety #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Safety -> m Safety #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Safety -> m Safety #

Enum Safety Source # 
Instance details

Defined in GHC.Types.ForeignCall

Show Safety Source # 
Instance details

Defined in GHC.Types.ForeignCall

Eq Safety Source # 
Instance details

Defined in GHC.Types.ForeignCall

Methods

(==) :: Safety -> Safety -> Bool #

(/=) :: Safety -> Safety -> Bool #

type Anno Safety Source # 
Instance details

Defined in GHC.Hs.Decls

data CExportSpec Source #

Instances

Instances details
Binary CExportSpec Source # 
Instance details

Defined in GHC.Types.ForeignCall

Outputable CExportSpec Source # 
Instance details

Defined in GHC.Types.ForeignCall

Methods

ppr :: CExportSpec -> SDoc Source #

Data CExportSpec Source # 
Instance details

Defined in GHC.Types.ForeignCall

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CExportSpec -> c CExportSpec #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c CExportSpec #

toConstr :: CExportSpec -> Constr #

dataTypeOf :: CExportSpec -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c CExportSpec) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c CExportSpec) #

gmapT :: (forall b. Data b => b -> b) -> CExportSpec -> CExportSpec #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CExportSpec -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CExportSpec -> r #

gmapQ :: (forall d. Data d => d -> u) -> CExportSpec -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> CExportSpec -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> CExportSpec -> m CExportSpec #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CExportSpec -> m CExportSpec #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CExportSpec -> m CExportSpec #

type Anno CExportSpec Source # 
Instance details

Defined in GHC.Hs.Decls

data CCallSpec Source #

Instances

Instances details
Binary CCallSpec Source # 
Instance details

Defined in GHC.Types.ForeignCall

Outputable CCallSpec Source # 
Instance details

Defined in GHC.Types.ForeignCall

Methods

ppr :: CCallSpec -> SDoc Source #

Eq CCallSpec Source # 
Instance details

Defined in GHC.Types.ForeignCall

data CCallTarget Source #

How to call a particular function in C-land.

Instances

Instances details
Binary CCallTarget Source # 
Instance details

Defined in GHC.Types.ForeignCall

Data CCallTarget Source # 
Instance details

Defined in GHC.Types.ForeignCall

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CCallTarget -> c CCallTarget #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c CCallTarget #

toConstr :: CCallTarget -> Constr #

dataTypeOf :: CCallTarget -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c CCallTarget) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c CCallTarget) #

gmapT :: (forall b. Data b => b -> b) -> CCallTarget -> CCallTarget #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CCallTarget -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CCallTarget -> r #

gmapQ :: (forall d. Data d => d -> u) -> CCallTarget -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> CCallTarget -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> CCallTarget -> m CCallTarget #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CCallTarget -> m CCallTarget #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CCallTarget -> m CCallTarget #

Eq CCallTarget Source # 
Instance details

Defined in GHC.Types.ForeignCall

data CCallConv Source #

Instances

Instances details
Binary CCallConv Source # 
Instance details

Defined in GHC.Types.ForeignCall

Outputable CCallConv Source # 
Instance details

Defined in GHC.Types.ForeignCall

Methods

ppr :: CCallConv -> SDoc Source #

Data CCallConv Source # 
Instance details

Defined in GHC.Types.ForeignCall

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CCallConv -> c CCallConv #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c CCallConv #

toConstr :: CCallConv -> Constr #

dataTypeOf :: CCallConv -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c CCallConv) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c CCallConv) #

gmapT :: (forall b. Data b => b -> b) -> CCallConv -> CCallConv #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CCallConv -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CCallConv -> r #

gmapQ :: (forall d. Data d => d -> u) -> CCallConv -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> CCallConv -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> CCallConv -> m CCallConv #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CCallConv -> m CCallConv #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CCallConv -> m CCallConv #

Enum CCallConv Source # 
Instance details

Defined in GHC.Types.ForeignCall

Eq CCallConv Source # 
Instance details

Defined in GHC.Types.ForeignCall

type Anno CCallConv Source # 
Instance details

Defined in GHC.Hs.Decls

data Header Source #

Instances

Instances details
Binary Header Source # 
Instance details

Defined in GHC.Types.ForeignCall

Outputable Header Source # 
Instance details

Defined in GHC.Types.ForeignCall

Methods

ppr :: Header -> SDoc Source #

Data Header Source # 
Instance details

Defined in GHC.Types.ForeignCall

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Header -> c Header #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Header #

toConstr :: Header -> Constr #

dataTypeOf :: Header -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Header) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Header) #

gmapT :: (forall b. Data b => b -> b) -> Header -> Header #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Header -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Header -> r #

gmapQ :: (forall d. Data d => d -> u) -> Header -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Header -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Header -> m Header #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Header -> m Header #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Header -> m Header #

Eq Header Source # 
Instance details

Defined in GHC.Types.ForeignCall

Methods

(==) :: Header -> Header -> Bool #

(/=) :: Header -> Header -> Bool #

data CType Source #

A C type, used in CAPI FFI calls

Instances

Instances details
Binary CType Source # 
Instance details

Defined in GHC.Types.ForeignCall

Outputable CType Source # 
Instance details

Defined in GHC.Types.ForeignCall

Methods

ppr :: CType -> SDoc Source #

Data CType Source # 
Instance details

Defined in GHC.Types.ForeignCall

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CType -> c CType #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c CType #

toConstr :: CType -> Constr #

dataTypeOf :: CType -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c CType) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c CType) #

gmapT :: (forall b. Data b => b -> b) -> CType -> CType #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CType -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CType -> r #

gmapQ :: (forall d. Data d => d -> u) -> CType -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> CType -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> CType -> m CType #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CType -> m CType #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CType -> m CType #

Eq CType Source # 
Instance details

Defined in GHC.Types.ForeignCall

Methods

(==) :: CType -> CType -> Bool #

(/=) :: CType -> CType -> Bool #

type Anno CType Source # 
Instance details

Defined in GHC.Hs.Decls