SafeHaskell: Transitively check safety when compiling a module.
While we previously checked the safety of safe imported modules we didn't do this check transitively. This can be a problem when we depend on a trustworthy module in a package that is no longer trusted, so we should fail compilation. We already stored in an interface file the transitive list of packages a module depends on. Now we extend that list to include a flag saying if we depend on that package being trusted as well.
Showing with 123 additions and 41 deletions