ghc-8.2.0.20170404: The GHC API

Safe HaskellNone
LanguageHaskell2010

TcForeign (signature[?])

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.