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

Safe HaskellNone
LanguageHaskell2010

TcForeign

Synopsis

Documentation

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.