ghc-lib-0.1.0: The GHC API, decoupled from GHC versions

Safe HaskellNone
LanguageHaskell2010

TcForeign

Documentation

tcForeignImports :: [LForeignDecl GhcRn] -> TcM ([Id], [LForeignDecl GhcTc], Bag GlobalRdrElt) Source #

tcForeignExports :: [LForeignDecl GhcRn] -> TcM (LHsBinds GhcTcId, [LForeignDecl GhcTcId], Bag GlobalRdrElt) Source #

isForeignImport :: LForeignDecl name -> Bool Source #

isForeignExport :: LForeignDecl name -> Bool Source #

tcFImport :: LForeignDecl GhcRn -> TcM (Id, LForeignDecl GhcTc, Bag GlobalRdrElt) Source #

tcFExport :: ForeignDecl GhcRn -> TcM (LHsBind GhcTc, ForeignDecl GhcTc, Bag GlobalRdrElt) Source #

tcForeignImports' :: [LForeignDecl GhcRn] -> TcM ([Id], [LForeignDecl GhcTc], Bag GlobalRdrElt) Source #

tcCheckFIType :: [Type] -> Type -> ForeignImport -> TcM ForeignImport Source #

checkCTarget :: CCallTarget -> TcM () Source #

checkForeignArgs :: (Type -> Validity) -> [Type] -> TcM () Source #

checkForeignRes :: Bool -> Bool -> (Type -> Validity) -> Type -> TcM () Source #

Check that the type has the form (IO t) or (t) , and that t satisfies the given predicate. When calling this function, any newtype wrappers (should) have been already dealt with by normaliseFfiType.

We also check that the Safe Haskell condition of FFI imports having results in the IO monad holds.

normaliseFfiType :: Type -> TcM (Coercion, Type, Bag GlobalRdrElt) Source #

nonIOok :: Bool Source #

mustBeIO :: Bool Source #

checkSafe :: Bool Source #

noCheckSafe :: Bool Source #

tcForeignExports' :: [LForeignDecl GhcRn] -> TcM (LHsBinds GhcTcId, [LForeignDecl GhcTcId], Bag GlobalRdrElt) Source #

tcCheckFEType :: Type -> ForeignExport -> TcM ForeignExport Source #

AltStyle によって変換されたページ (->オリジナル) /