From 7bbd38cc6dcdc4c7964fc5738052d7cf1a1689fa Mon Sep 17 00:00:00 2001 From: John Ericson Date: Wed, 8 Jun 2022 03:40:24 +0000 Subject: WIP Add test --- T21705/a/Foo.hs | 6 ++++++ T21705/a/a.cabal | 8 ++++++++ T21705/b/b.cabal | 9 +++++++++ T21705/c/Bar.hs | 6 ++++++ T21705/c/c.cabal | 11 +++++++++++ T21705/cabal.project | 1 + 6 files changed, 41 insertions(+) create mode 100644 T21705/a/Foo.hs create mode 100644 T21705/a/a.cabal create mode 100644 T21705/b/b.cabal create mode 100644 T21705/c/Bar.hs create mode 100644 T21705/c/c.cabal create mode 100644 T21705/cabal.project diff --git a/T21705/a/Foo.hs b/T21705/a/Foo.hs new file mode 100644 index 0000000000..dfbbb90058 --- /dev/null +++ b/T21705/a/Foo.hs @@ -0,0 +1,6 @@ +{-# LANGUAGE Trustworthy #-} +module Foo where + +import Unsafe.Coerce (unsafeCoerce) + +x = unsafeCoerce diff --git a/T21705/a/a.cabal b/T21705/a/a.cabal new file mode 100644 index 0000000000..b5d01c8af9 --- /dev/null +++ b/T21705/a/a.cabal @@ -0,0 +1,8 @@ +name: a +version: 0 +build-type: Simple + +library + exposed-modules: + Foo + build-depends: base diff --git a/T21705/b/b.cabal b/T21705/b/b.cabal new file mode 100644 index 0000000000..244f6d9640 --- /dev/null +++ b/T21705/b/b.cabal @@ -0,0 +1,9 @@ +name: b +version: 0 +build-type: Simple + +library + reexported-modules: + Foo + build-depends: base + , a diff --git a/T21705/c/Bar.hs b/T21705/c/Bar.hs new file mode 100644 index 0000000000..4950384014 --- /dev/null +++ b/T21705/c/Bar.hs @@ -0,0 +1,6 @@ +{-# LANGUAGE Safe #-} +{-# LANGUAGE NoImplicitPrelude #-} +{-# OPTIONS_GHC -fpackage-trust #-} +module Bar where + +import Foo diff --git a/T21705/c/c.cabal b/T21705/c/c.cabal new file mode 100644 index 0000000000..d55b95d9f0 --- /dev/null +++ b/T21705/c/c.cabal @@ -0,0 +1,11 @@ +name: c +version: 0 +build-type: Simple + +library + exposed-modules: + Bar + build-depends: base + , b + --ghc-options: -trust a + ghc-options: -trust b diff --git a/T21705/cabal.project b/T21705/cabal.project new file mode 100644 index 0000000000..21bbb8b27b --- /dev/null +++ b/T21705/cabal.project @@ -0,0 +1 @@ +packages: a b c -- cgit v1.2.1