| Safe Haskell | None |
|---|---|
| Language | GHC2024 |
Language.Haskell.Syntax.Decls.Foreign
Description
Abstract syntax of foreign function interface declarations.
Synopsis
- data ForeignDecl pass
- = ForeignImport {
- fd_i_ext :: XForeignImport pass
- fd_name :: LIdP pass
- fd_sig_ty :: LHsSigType pass
- fd_fi :: ForeignImport pass
- | ForeignExport {
- fd_e_ext :: XForeignExport pass
- fd_name :: LIdP pass
- fd_sig_ty :: LHsSigType pass
- fd_fe :: ForeignExport pass
- | XForeignDecl !(XXForeignDecl pass)
- = ForeignImport {
- type LForeignDecl pass = XRec pass (ForeignDecl pass)
- data ForeignExport pass
- = CExport (XCExport pass) (XRec pass CExportSpec)
- | XForeignExport !(XXForeignExport pass)
- data CExportSpec = CExportStatic CLabelString CCallConv
- data ForeignImport pass
- = CImport (XCImport pass) (XRec pass CCallConv) (XRec pass Safety) (Maybe (Header pass)) (CImportSpec pass)
- | XForeignImport !(XXForeignImport pass)
- data CImportSpec pass
- = CLabel CLabelString
- | CFunction (CCallTarget pass)
- | CWrapper
- data CCallTarget pass
- = StaticTarget (XStaticTarget pass) CLabelString ForeignKind
- | DynamicTarget (XDynamicTarget pass)
- | XCCallTarget !(XXCCallTarget pass)
- data ForeignKind
- data Safety
- data CType pass
- type CLabelString = FastString
- data CCallConv
- data Header pass
- = Header (XHeader pass) FastString
- | XHeader !(XXHeader pass)
- type family XForeignExport x
- type family XForeignImport x
- type family XXForeignDecl x
- type family XCExport x
- type family XXForeignExport x
- type family XCImport x
- type family XXForeignImport x
- type family XStaticTarget x
- type family XDynamicTarget x
- type family XXCCallTarget x
- type family XCType x
- type family XXCType x
- type family XHeader x
- type family XXHeader x
Foreign function interface declarations
Data-type
data ForeignDecl pass Source #
Foreign Declaration
Constructors
| ForeignImport | |
Fields
| |
| ForeignExport | |
Fields
| |
| XForeignDecl !(XXForeignDecl pass) | |
Instances
| OutputableBndrId p => Outputable (ForeignDecl (GhcPass p)) Source # | |
Defined in GHC.Hs.Decls | |
| Data (ForeignDecl GhcPs) Source # | |
Defined in GHC.Hs.Instances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ForeignDecl GhcPs -> c (ForeignDecl GhcPs) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (ForeignDecl GhcPs) Source # toConstr :: ForeignDecl GhcPs -> Constr Source # dataTypeOf :: ForeignDecl GhcPs -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (ForeignDecl GhcPs)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (ForeignDecl GhcPs)) Source # gmapT :: (forall b. Data b => b -> b) -> ForeignDecl GhcPs -> ForeignDecl GhcPs Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ForeignDecl GhcPs -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ForeignDecl GhcPs -> r Source # gmapQ :: (forall d. Data d => d -> u) -> ForeignDecl GhcPs -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> ForeignDecl GhcPs -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> ForeignDecl GhcPs -> m (ForeignDecl GhcPs) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ForeignDecl GhcPs -> m (ForeignDecl GhcPs) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ForeignDecl GhcPs -> m (ForeignDecl GhcPs) Source # | |
| Data (ForeignDecl GhcRn) Source # | |
Defined in GHC.Hs.Instances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ForeignDecl GhcRn -> c (ForeignDecl GhcRn) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (ForeignDecl GhcRn) Source # toConstr :: ForeignDecl GhcRn -> Constr Source # dataTypeOf :: ForeignDecl GhcRn -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (ForeignDecl GhcRn)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (ForeignDecl GhcRn)) Source # gmapT :: (forall b. Data b => b -> b) -> ForeignDecl GhcRn -> ForeignDecl GhcRn Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ForeignDecl GhcRn -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ForeignDecl GhcRn -> r Source # gmapQ :: (forall d. Data d => d -> u) -> ForeignDecl GhcRn -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> ForeignDecl GhcRn -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> ForeignDecl GhcRn -> m (ForeignDecl GhcRn) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ForeignDecl GhcRn -> m (ForeignDecl GhcRn) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ForeignDecl GhcRn -> m (ForeignDecl GhcRn) Source # | |
| Data (ForeignDecl GhcTc) Source # | |
Defined in GHC.Hs.Instances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ForeignDecl GhcTc -> c (ForeignDecl GhcTc) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (ForeignDecl GhcTc) Source # toConstr :: ForeignDecl GhcTc -> Constr Source # dataTypeOf :: ForeignDecl GhcTc -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (ForeignDecl GhcTc)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (ForeignDecl GhcTc)) Source # gmapT :: (forall b. Data b => b -> b) -> ForeignDecl GhcTc -> ForeignDecl GhcTc Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ForeignDecl GhcTc -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ForeignDecl GhcTc -> r Source # gmapQ :: (forall d. Data d => d -> u) -> ForeignDecl GhcTc -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> ForeignDecl GhcTc -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> ForeignDecl GhcTc -> m (ForeignDecl GhcTc) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ForeignDecl GhcTc -> m (ForeignDecl GhcTc) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ForeignDecl GhcTc -> m (ForeignDecl GhcTc) Source # | |
| type Anno (ForeignDecl (GhcPass p)) Source # | |
Defined in GHC.Hs.Decls | |
Record synonym
type LForeignDecl pass = XRec pass (ForeignDecl pass) Source #
Located Foreign Declaration
Foreign export types
Data-type
data ForeignExport pass Source #
Specification of an externally exported entity in dependence on the calling convention
Constructors
| CExport (XCExport pass) (XRec pass CExportSpec) | contains the calling convention |
| XForeignExport !(XXForeignExport pass) |
Instances
| OutputableBndrId p => Outputable (ForeignExport (GhcPass p)) Source # | |
Defined in GHC.Hs.Decls | |
| Data (ForeignExport GhcPs) Source # | |
Defined in GHC.Hs.Instances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ForeignExport GhcPs -> c (ForeignExport GhcPs) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (ForeignExport GhcPs) Source # toConstr :: ForeignExport GhcPs -> Constr Source # dataTypeOf :: ForeignExport GhcPs -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (ForeignExport GhcPs)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (ForeignExport GhcPs)) Source # gmapT :: (forall b. Data b => b -> b) -> ForeignExport GhcPs -> ForeignExport GhcPs Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ForeignExport GhcPs -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ForeignExport GhcPs -> r Source # gmapQ :: (forall d. Data d => d -> u) -> ForeignExport GhcPs -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> ForeignExport GhcPs -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> ForeignExport GhcPs -> m (ForeignExport GhcPs) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ForeignExport GhcPs -> m (ForeignExport GhcPs) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ForeignExport GhcPs -> m (ForeignExport GhcPs) Source # | |
| Data (ForeignExport GhcRn) Source # | |
Defined in GHC.Hs.Instances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ForeignExport GhcRn -> c (ForeignExport GhcRn) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (ForeignExport GhcRn) Source # toConstr :: ForeignExport GhcRn -> Constr Source # dataTypeOf :: ForeignExport GhcRn -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (ForeignExport GhcRn)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (ForeignExport GhcRn)) Source # gmapT :: (forall b. Data b => b -> b) -> ForeignExport GhcRn -> ForeignExport GhcRn Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ForeignExport GhcRn -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ForeignExport GhcRn -> r Source # gmapQ :: (forall d. Data d => d -> u) -> ForeignExport GhcRn -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> ForeignExport GhcRn -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> ForeignExport GhcRn -> m (ForeignExport GhcRn) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ForeignExport GhcRn -> m (ForeignExport GhcRn) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ForeignExport GhcRn -> m (ForeignExport GhcRn) Source # | |
| Data (ForeignExport GhcTc) Source # | |
Defined in GHC.Hs.Instances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ForeignExport GhcTc -> c (ForeignExport GhcTc) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (ForeignExport GhcTc) Source # toConstr :: ForeignExport GhcTc -> Constr Source # dataTypeOf :: ForeignExport GhcTc -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (ForeignExport GhcTc)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (ForeignExport GhcTc)) Source # gmapT :: (forall b. Data b => b -> b) -> ForeignExport GhcTc -> ForeignExport GhcTc Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ForeignExport GhcTc -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ForeignExport GhcTc -> r Source # gmapQ :: (forall d. Data d => d -> u) -> ForeignExport GhcTc -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> ForeignExport GhcTc -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> ForeignExport GhcTc -> m (ForeignExport GhcTc) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ForeignExport GhcTc -> m (ForeignExport GhcTc) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ForeignExport GhcTc -> m (ForeignExport GhcTc) Source # | |
Specification
data CExportSpec Source #
Constructors
| CExportStatic CLabelString CCallConv | foreign export ccall foo :: ty |
Instances
Foreign import types
Data-type
data ForeignImport pass Source #
Specification Of an imported external entity in dependence on the calling convention
Constructors
| CImport (XCImport pass) (XRec pass CCallConv) (XRec pass Safety) (Maybe (Header pass)) (CImportSpec pass) | Import of a C entity
|
| XForeignImport !(XXForeignImport pass) |
Instances
| (IsPass p, OutputableBndrId p) => Outputable (ForeignImport (GhcPass p)) Source # | |
Defined in GHC.Hs.Decls | |
| Data (ForeignImport GhcPs) Source # | |
Defined in GHC.Hs.Instances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ForeignImport GhcPs -> c (ForeignImport GhcPs) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (ForeignImport GhcPs) Source # toConstr :: ForeignImport GhcPs -> Constr Source # dataTypeOf :: ForeignImport GhcPs -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (ForeignImport GhcPs)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (ForeignImport GhcPs)) Source # gmapT :: (forall b. Data b => b -> b) -> ForeignImport GhcPs -> ForeignImport GhcPs Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ForeignImport GhcPs -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ForeignImport GhcPs -> r Source # gmapQ :: (forall d. Data d => d -> u) -> ForeignImport GhcPs -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> ForeignImport GhcPs -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> ForeignImport GhcPs -> m (ForeignImport GhcPs) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ForeignImport GhcPs -> m (ForeignImport GhcPs) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ForeignImport GhcPs -> m (ForeignImport GhcPs) Source # | |
| Data (ForeignImport GhcRn) Source # | |
Defined in GHC.Hs.Instances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ForeignImport GhcRn -> c (ForeignImport GhcRn) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (ForeignImport GhcRn) Source # toConstr :: ForeignImport GhcRn -> Constr Source # dataTypeOf :: ForeignImport GhcRn -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (ForeignImport GhcRn)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (ForeignImport GhcRn)) Source # gmapT :: (forall b. Data b => b -> b) -> ForeignImport GhcRn -> ForeignImport GhcRn Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ForeignImport GhcRn -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ForeignImport GhcRn -> r Source # gmapQ :: (forall d. Data d => d -> u) -> ForeignImport GhcRn -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> ForeignImport GhcRn -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> ForeignImport GhcRn -> m (ForeignImport GhcRn) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ForeignImport GhcRn -> m (ForeignImport GhcRn) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ForeignImport GhcRn -> m (ForeignImport GhcRn) Source # | |
| Data (ForeignImport GhcTc) Source # | |
Defined in GHC.Hs.Instances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ForeignImport GhcTc -> c (ForeignImport GhcTc) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (ForeignImport GhcTc) Source # toConstr :: ForeignImport GhcTc -> Constr Source # dataTypeOf :: ForeignImport GhcTc -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (ForeignImport GhcTc)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (ForeignImport GhcTc)) Source # gmapT :: (forall b. Data b => b -> b) -> ForeignImport GhcTc -> ForeignImport GhcTc Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ForeignImport GhcTc -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ForeignImport GhcTc -> r Source # gmapQ :: (forall d. Data d => d -> u) -> ForeignImport GhcTc -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> ForeignImport GhcTc -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> ForeignImport GhcTc -> m (ForeignImport GhcTc) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ForeignImport GhcTc -> m (ForeignImport GhcTc) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ForeignImport GhcTc -> m (ForeignImport GhcTc) Source # | |
Specification
data CImportSpec pass Source #
Details of an external C entity
Constructors
| CLabel CLabelString | |
| CFunction (CCallTarget pass) | |
| CWrapper |
Instances
| Data (CImportSpec GhcPs) Source # | |
Defined in GHC.Hs.Instances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CImportSpec GhcPs -> c (CImportSpec GhcPs) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (CImportSpec GhcPs) Source # toConstr :: CImportSpec GhcPs -> Constr Source # dataTypeOf :: CImportSpec GhcPs -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (CImportSpec GhcPs)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (CImportSpec GhcPs)) Source # gmapT :: (forall b. Data b => b -> b) -> CImportSpec GhcPs -> CImportSpec GhcPs Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CImportSpec GhcPs -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CImportSpec GhcPs -> r Source # gmapQ :: (forall d. Data d => d -> u) -> CImportSpec GhcPs -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> CImportSpec GhcPs -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> CImportSpec GhcPs -> m (CImportSpec GhcPs) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CImportSpec GhcPs -> m (CImportSpec GhcPs) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CImportSpec GhcPs -> m (CImportSpec GhcPs) Source # | |
| Data (CImportSpec GhcRn) Source # | |
Defined in GHC.Hs.Instances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CImportSpec GhcRn -> c (CImportSpec GhcRn) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (CImportSpec GhcRn) Source # toConstr :: CImportSpec GhcRn -> Constr Source # dataTypeOf :: CImportSpec GhcRn -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (CImportSpec GhcRn)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (CImportSpec GhcRn)) Source # gmapT :: (forall b. Data b => b -> b) -> CImportSpec GhcRn -> CImportSpec GhcRn Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CImportSpec GhcRn -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CImportSpec GhcRn -> r Source # gmapQ :: (forall d. Data d => d -> u) -> CImportSpec GhcRn -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> CImportSpec GhcRn -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> CImportSpec GhcRn -> m (CImportSpec GhcRn) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CImportSpec GhcRn -> m (CImportSpec GhcRn) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CImportSpec GhcRn -> m (CImportSpec GhcRn) Source # | |
| Data (CImportSpec GhcTc) Source # | |
Defined in GHC.Hs.Instances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CImportSpec GhcTc -> c (CImportSpec GhcTc) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (CImportSpec GhcTc) Source # toConstr :: CImportSpec GhcTc -> Constr Source # dataTypeOf :: CImportSpec GhcTc -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (CImportSpec GhcTc)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (CImportSpec GhcTc)) Source # gmapT :: (forall b. Data b => b -> b) -> CImportSpec GhcTc -> CImportSpec GhcTc Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CImportSpec GhcTc -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CImportSpec GhcTc -> r Source # gmapQ :: (forall d. Data d => d -> u) -> CImportSpec GhcTc -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> CImportSpec GhcTc -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> CImportSpec GhcTc -> m (CImportSpec GhcTc) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CImportSpec GhcTc -> m (CImportSpec GhcTc) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CImportSpec GhcTc -> m (CImportSpec GhcTc) Source # | |
Sub-types
data CCallTarget pass Source #
How to call a particular function in C-land.
Constructors
| StaticTarget (XStaticTarget pass) CLabelString ForeignKind | |
| DynamicTarget (XDynamicTarget pass) | The first argument of the import is the name of a function pointer (an Addr#). Used when importing a label as "foreign import ccall "dynamic" ..." |
| XCCallTarget !(XXCCallTarget pass) |
Instances
| IsPass p => NFData (CCallTarget (GhcPass p)) Source # | |
Defined in GHC.Types.ForeignCall Methods rnf :: CCallTarget (GhcPass p) -> () Source # | |
| IsPass p => Binary (CCallTarget (GhcPass p)) Source # | |
Defined in GHC.Types.ForeignCall Methods put_ :: WriteBinHandle -> CCallTarget (GhcPass p) -> IO () Source # put :: WriteBinHandle -> CCallTarget (GhcPass p) -> IO (Bin (CCallTarget (GhcPass p))) Source # get :: ReadBinHandle -> IO (CCallTarget (GhcPass p)) Source # | |
| IsPass p => Eq (CCallTarget (GhcPass p)) Source # | |
Defined in GHC.Types.ForeignCall Methods (==) :: CCallTarget (GhcPass p) -> CCallTarget (GhcPass p) -> Bool Source # (/=) :: CCallTarget (GhcPass p) -> CCallTarget (GhcPass p) -> Bool Source # | |
| Data (CCallTarget GhcPs) Source # | |
Defined in GHC.Hs.Instances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CCallTarget GhcPs -> c (CCallTarget GhcPs) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (CCallTarget GhcPs) Source # toConstr :: CCallTarget GhcPs -> Constr Source # dataTypeOf :: CCallTarget GhcPs -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (CCallTarget GhcPs)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (CCallTarget GhcPs)) Source # gmapT :: (forall b. Data b => b -> b) -> CCallTarget GhcPs -> CCallTarget GhcPs Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CCallTarget GhcPs -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CCallTarget GhcPs -> r Source # gmapQ :: (forall d. Data d => d -> u) -> CCallTarget GhcPs -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> CCallTarget GhcPs -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> CCallTarget GhcPs -> m (CCallTarget GhcPs) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CCallTarget GhcPs -> m (CCallTarget GhcPs) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CCallTarget GhcPs -> m (CCallTarget GhcPs) Source # | |
| Data (CCallTarget GhcRn) Source # | |
Defined in GHC.Hs.Instances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CCallTarget GhcRn -> c (CCallTarget GhcRn) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (CCallTarget GhcRn) Source # toConstr :: CCallTarget GhcRn -> Constr Source # dataTypeOf :: CCallTarget GhcRn -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (CCallTarget GhcRn)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (CCallTarget GhcRn)) Source # gmapT :: (forall b. Data b => b -> b) -> CCallTarget GhcRn -> CCallTarget GhcRn Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CCallTarget GhcRn -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CCallTarget GhcRn -> r Source # gmapQ :: (forall d. Data d => d -> u) -> CCallTarget GhcRn -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> CCallTarget GhcRn -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> CCallTarget GhcRn -> m (CCallTarget GhcRn) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CCallTarget GhcRn -> m (CCallTarget GhcRn) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CCallTarget GhcRn -> m (CCallTarget GhcRn) Source # | |
| Data (CCallTarget GhcTc) Source # | |
Defined in GHC.Hs.Instances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CCallTarget GhcTc -> c (CCallTarget GhcTc) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (CCallTarget GhcTc) Source # toConstr :: CCallTarget GhcTc -> Constr Source # dataTypeOf :: CCallTarget GhcTc -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (CCallTarget GhcTc)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (CCallTarget GhcTc)) Source # gmapT :: (forall b. Data b => b -> b) -> CCallTarget GhcTc -> CCallTarget GhcTc Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CCallTarget GhcTc -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CCallTarget GhcTc -> r Source # gmapQ :: (forall d. Data d => d -> u) -> CCallTarget GhcTc -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> CCallTarget GhcTc -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> CCallTarget GhcTc -> m (CCallTarget GhcTc) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CCallTarget GhcTc -> m (CCallTarget GhcTc) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CCallTarget GhcTc -> m (CCallTarget GhcTc) Source # | |
data ForeignKind Source #
Constructors
| ForeignValue | Binds to a value, a zero-arity function. |
| ForeignFunction | Binds to a function with arity of at least one. |
Instances
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:
|
Instances
Foreign binding type
A C type, used in CAPI FFI calls
Instances
| NFData (CType (GhcPass p)) Source # | |
| Binary (CType (GhcPass p)) Source # | |
| Outputable (CType (GhcPass p)) Source # | |
| Data (CType GhcPs) Source # | |
Defined in GHC.Hs.Instances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CType GhcPs -> c (CType GhcPs) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (CType GhcPs) Source # toConstr :: CType GhcPs -> Constr Source # dataTypeOf :: CType GhcPs -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (CType GhcPs)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (CType GhcPs)) Source # gmapT :: (forall b. Data b => b -> b) -> CType GhcPs -> CType GhcPs Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CType GhcPs -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CType GhcPs -> r Source # gmapQ :: (forall d. Data d => d -> u) -> CType GhcPs -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> CType GhcPs -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> CType GhcPs -> m (CType GhcPs) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CType GhcPs -> m (CType GhcPs) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CType GhcPs -> m (CType GhcPs) Source # | |
| Data (CType GhcRn) Source # | |
Defined in GHC.Hs.Instances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CType GhcRn -> c (CType GhcRn) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (CType GhcRn) Source # toConstr :: CType GhcRn -> Constr Source # dataTypeOf :: CType GhcRn -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (CType GhcRn)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (CType GhcRn)) Source # gmapT :: (forall b. Data b => b -> b) -> CType GhcRn -> CType GhcRn Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CType GhcRn -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CType GhcRn -> r Source # gmapQ :: (forall d. Data d => d -> u) -> CType GhcRn -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> CType GhcRn -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> CType GhcRn -> m (CType GhcRn) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CType GhcRn -> m (CType GhcRn) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CType GhcRn -> m (CType GhcRn) Source # | |
| Data (CType GhcTc) Source # | |
Defined in GHC.Hs.Instances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CType GhcTc -> c (CType GhcTc) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (CType GhcTc) Source # toConstr :: CType GhcTc -> Constr Source # dataTypeOf :: CType GhcTc -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (CType GhcTc)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (CType GhcTc)) Source # gmapT :: (forall b. Data b => b -> b) -> CType GhcTc -> CType GhcTc Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CType GhcTc -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CType GhcTc -> r Source # gmapQ :: (forall d. Data d => d -> u) -> CType GhcTc -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> CType GhcTc -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> CType GhcTc -> m (CType GhcTc) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CType GhcTc -> m (CType GhcTc) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CType GhcTc -> m (CType GhcTc) Source # | |
| type Anno (CType (GhcPass p)) Source # | |
Defined in GHC.Hs.Decls | |
General sub-types
type CLabelString = FastString Source #
Constructors
| CCallConv | |
| CApiConv | |
| StdCallConv | |
| PrimCallConv | |
| JavaScriptCallConv |
Instances
Constructors
| Header (XHeader pass) FastString | |
| XHeader !(XXHeader pass) |
Instances
| NFData (Header (GhcPass p)) Source # | |
| Binary (Header (GhcPass p)) Source # | |
| Outputable (Header (GhcPass p)) Source # | |
| Eq (Header (GhcPass p)) Source # | |
| Data (Header GhcPs) Source # | |
Defined in GHC.Hs.Instances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Header GhcPs -> c (Header GhcPs) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Header GhcPs) Source # toConstr :: Header GhcPs -> Constr Source # dataTypeOf :: Header GhcPs -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Header GhcPs)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Header GhcPs)) Source # gmapT :: (forall b. Data b => b -> b) -> Header GhcPs -> Header GhcPs Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Header GhcPs -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Header GhcPs -> r Source # gmapQ :: (forall d. Data d => d -> u) -> Header GhcPs -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> Header GhcPs -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Header GhcPs -> m (Header GhcPs) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Header GhcPs -> m (Header GhcPs) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Header GhcPs -> m (Header GhcPs) Source # | |
| Data (Header GhcRn) Source # | |
Defined in GHC.Hs.Instances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Header GhcRn -> c (Header GhcRn) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Header GhcRn) Source # toConstr :: Header GhcRn -> Constr Source # dataTypeOf :: Header GhcRn -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Header GhcRn)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Header GhcRn)) Source # gmapT :: (forall b. Data b => b -> b) -> Header GhcRn -> Header GhcRn Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Header GhcRn -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Header GhcRn -> r Source # gmapQ :: (forall d. Data d => d -> u) -> Header GhcRn -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> Header GhcRn -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Header GhcRn -> m (Header GhcRn) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Header GhcRn -> m (Header GhcRn) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Header GhcRn -> m (Header GhcRn) Source # | |
| Data (Header GhcTc) Source # | |
Defined in GHC.Hs.Instances Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Header GhcTc -> c (Header GhcTc) Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Header GhcTc) Source # toConstr :: Header GhcTc -> Constr Source # dataTypeOf :: Header GhcTc -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Header GhcTc)) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Header GhcTc)) Source # gmapT :: (forall b. Data b => b -> b) -> Header GhcTc -> Header GhcTc Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Header GhcTc -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Header GhcTc -> r Source # gmapQ :: (forall d. Data d => d -> u) -> Header GhcTc -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> Header GhcTc -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Header GhcTc -> m (Header GhcTc) Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Header GhcTc -> m (Header GhcTc) Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Header GhcTc -> m (Header GhcTc) Source # | |
Extension points
ForeignDecl
type family XForeignExport x Source #
Instances
| type XForeignExport GhcPs Source # | |
Defined in GHC.Hs.Decls | |
| type XForeignExport GhcRn Source # | |
Defined in GHC.Hs.Decls | |
| type XForeignExport GhcTc Source # | |
Defined in GHC.Hs.Decls | |
type family XForeignImport x Source #
Instances
| type XForeignImport GhcPs Source # | |
Defined in GHC.Hs.Decls | |
| type XForeignImport GhcRn Source # | |
Defined in GHC.Hs.Decls | |
| type XForeignImport GhcTc Source # | |
Defined in GHC.Hs.Decls | |
type family XXForeignDecl x Source #
Instances
| type XXForeignDecl (GhcPass _1) Source # | |
Defined in GHC.Hs.Decls | |
ForeignExport
type family XCExport x Source #
Instances
| type XCExport (GhcPass _1) Source # | |
Defined in GHC.Hs.Decls | |
type family XXForeignExport x Source #
Instances
| type XXForeignExport (GhcPass _1) Source # | |
Defined in GHC.Hs.Decls | |
ForeignImport
type family XCImport x Source #
Instances
| type XCImport (GhcPass _1) Source # | |
Defined in GHC.Hs.Decls | |
type family XXForeignImport x Source #
Instances
| type XXForeignImport (GhcPass _1) Source # | |
Defined in GHC.Hs.Decls | |
CCallTarget
type family XStaticTarget x Source #
Instances
| type XStaticTarget GhcPs Source # | |
Defined in GHC.Types.ForeignCall | |
| type XStaticTarget GhcRn Source # | |
Defined in GHC.Types.ForeignCall | |
| type XStaticTarget GhcTc Source # | |
Defined in GHC.Types.ForeignCall | |
type family XDynamicTarget x Source #
Instances
| type XDynamicTarget (GhcPass p) Source # | |
Defined in GHC.Types.ForeignCall | |
type family XXCCallTarget x Source #
Instances
| type XXCCallTarget (GhcPass p) Source # | |
Defined in GHC.Types.ForeignCall | |
CType
type family XXCType x Source #
Instances
| type XXCType (GhcPass p) Source # | |
Defined in GHC.Types.ForeignCall | |