ghc-7.10.1: The GHC API

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.