ghc-7.8.4: The GHC API

Safe HaskellNone
LanguageHaskell98

TcForeign

Synopsis

Documentation

checkForeignRes :: Bool -> Bool -> (Type -> Bool) -> 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.