summaryrefslogtreecommitdiff
path: root/testsuite/tests/cabal
diff options
context:
space:
mode:
authorEdward Z. Yang <ezyang@cs.stanford.edu>2015-09-11 17:13:30 -0700
committerEdward Z. Yang <ezyang@cs.stanford.edu>2015-09-21 11:11:48 -0700
commit3f13c20e0c29d3db974c2a0d7d5ec15abd5a434b (patch)
tree0beb42ce43328983d54718bf835e82ea48c8d2db /testsuite/tests/cabal
parentc234acbe76da85556befad3eaa0c7c6b31e9e1c3 (diff)
downloadhaskell-3f13c20e0c29d3db974c2a0d7d5ec15abd5a434b.tar.gz
Revert "Revert "Revert "Support for multiple signature files in scope."""
This reverts commit 214596de224afa576a9c295bcf53c6941d6892e0.
Diffstat (limited to 'testsuite/tests/cabal')
-rw-r--r--testsuite/tests/cabal/sigcabal02/Main.hs7
-rw-r--r--testsuite/tests/cabal/sigcabal02/Makefile34
-rw-r--r--testsuite/tests/cabal/sigcabal02/Setup.hs2
-rw-r--r--testsuite/tests/cabal/sigcabal02/ShouldFail.hs1
-rw-r--r--testsuite/tests/cabal/sigcabal02/all.T9
-rw-r--r--testsuite/tests/cabal/sigcabal02/p/LICENSE0
-rw-r--r--testsuite/tests/cabal/sigcabal02/p/Map.hsig18
-rw-r--r--testsuite/tests/cabal/sigcabal02/p/P.hs12
-rw-r--r--testsuite/tests/cabal/sigcabal02/p/Set.hsig13
-rw-r--r--testsuite/tests/cabal/sigcabal02/p/p.cabal14
-rw-r--r--testsuite/tests/cabal/sigcabal02/q/LICENSE0
-rw-r--r--testsuite/tests/cabal/sigcabal02/q/Map.hsig7
-rw-r--r--testsuite/tests/cabal/sigcabal02/q/Q.hs7
-rw-r--r--testsuite/tests/cabal/sigcabal02/q/q.cabal13
-rw-r--r--testsuite/tests/cabal/sigcabal02/sigcabal02.stderr4
-rw-r--r--testsuite/tests/cabal/sigcabal02/sigcabal02.stdout5
16 files changed, 0 insertions, 146 deletions
diff --git a/testsuite/tests/cabal/sigcabal02/Main.hs b/testsuite/tests/cabal/sigcabal02/Main.hs
deleted file mode 100644
index 52def3d41f..0000000000
--- a/testsuite/tests/cabal/sigcabal02/Main.hs
+++ /dev/null
@@ -1,7 +0,0 @@
-import Map
-import P
-import Q
-
-main = do
- x <- foo
- print (mymember 5 x)
diff --git a/testsuite/tests/cabal/sigcabal02/Makefile b/testsuite/tests/cabal/sigcabal02/Makefile
deleted file mode 100644
index c45697d1b6..0000000000
--- a/testsuite/tests/cabal/sigcabal02/Makefile
+++ /dev/null
@@ -1,34 +0,0 @@
-TOP=../../..
-include $(TOP)/mk/boilerplate.mk
-include $(TOP)/mk/test.mk
-
-SETUP=../Setup -v0
-
-# This test is for two Cabal packages exposing the same signature
-
-sigcabal02:
- $(MAKE) clean
- '$(GHC_PKG)' field containers id | sed 's/^.*: *//' > containers
- '$(GHC_PKG)' init tmp.d
- '$(TEST_HC)' -v0 --make Setup
- cd p && $(SETUP) clean
- cd p && $(SETUP) configure $(CABAL_MINIMAL_BUILD) --with-ghc='$(TEST_HC)' --ghc-options='$(TEST_HC_OPTS)' --package-db=../tmp.d --prefix='$(PWD)/inst-p' --instantiate-with="Map=Data.Map.Lazy@`cat ../containers`" --instantiate-with="Set=Data.Set@`cat ../containers`" --ghc-pkg-options="--enable-multi-instance"
- cd p && $(SETUP) build
- cd p && $(SETUP) copy
- cd p && $(SETUP) register --print-ipid > ../p_ipid
- cd q && $(SETUP) clean
- cd q && $(SETUP) configure $(CABAL_MINIMAL_BUILD) --with-ghc='$(TEST_HC)' --ghc-options='$(TEST_HC_OPTS)' --package-db=../tmp.d --prefix='$(PWD)/inst-p' --instantiate-with="Map=Data.Map.Lazy@`cat ../containers`" --ghc-pkg-options="--enable-multi-instance"
- cd q && $(SETUP) build
- cd q && $(SETUP) copy
- cd q && $(SETUP) register --print-ipid > ../q_ipid
- '$(TEST_HC)' $(TEST_HC_OPTS) -package-db=tmp.d -hide-all-packages -package base -package containers -package-id "`cat p_ipid`" -package-id "`cat q_ipid`" --make Main.hs
- ./Main
- ! '$(TEST_HC)' $(TEST_HC_OPTS) -package-db=tmp.d -hide-all-packages -package base -package containers -package-id "`cat p_ipid`" -package-id "`cat q_ipid`" --make ShouldFail.hs
-ifneq "$(CLEANUP)" ""
- $(MAKE) clean
-endif
-
-clean :
- '$(GHC_PKG)' unregister --force p >/dev/null 2>&1 || true
- '$(GHC_PKG)' unregister --force q >/dev/null 2>&1 || true
- $(RM) -r tmp.d inst-* *.o *.hi */*.o */*.hi */Setup$(exeext) */dist Setup$(exeext)
diff --git a/testsuite/tests/cabal/sigcabal02/Setup.hs b/testsuite/tests/cabal/sigcabal02/Setup.hs
deleted file mode 100644
index 9a994af677..0000000000
--- a/testsuite/tests/cabal/sigcabal02/Setup.hs
+++ /dev/null
@@ -1,2 +0,0 @@
-import Distribution.Simple
-main = defaultMain
diff --git a/testsuite/tests/cabal/sigcabal02/ShouldFail.hs b/testsuite/tests/cabal/sigcabal02/ShouldFail.hs
deleted file mode 100644
index 98ec49e886..0000000000
--- a/testsuite/tests/cabal/sigcabal02/ShouldFail.hs
+++ /dev/null
@@ -1 +0,0 @@
-import Set
diff --git a/testsuite/tests/cabal/sigcabal02/all.T b/testsuite/tests/cabal/sigcabal02/all.T
deleted file mode 100644
index 11eb05975b..0000000000
--- a/testsuite/tests/cabal/sigcabal02/all.T
+++ /dev/null
@@ -1,9 +0,0 @@
-if default_testopts.cleanup != '':
- cleanup = 'CLEANUP=1'
-else:
- cleanup = ''
-
-test('sigcabal02',
- normal,
- run_command,
- ['$MAKE -s --no-print-directory sigcabal02 ' + cleanup])
diff --git a/testsuite/tests/cabal/sigcabal02/p/LICENSE b/testsuite/tests/cabal/sigcabal02/p/LICENSE
deleted file mode 100644
index e69de29bb2..0000000000
--- a/testsuite/tests/cabal/sigcabal02/p/LICENSE
+++ /dev/null
diff --git a/testsuite/tests/cabal/sigcabal02/p/Map.hsig b/testsuite/tests/cabal/sigcabal02/p/Map.hsig
deleted file mode 100644
index 359cf64ab9..0000000000
--- a/testsuite/tests/cabal/sigcabal02/p/Map.hsig
+++ /dev/null
@@ -1,18 +0,0 @@
-{-# LANGUAGE RoleAnnotations #-}
-module Map where
-
-import Set
-
-type role Map nominal representational
-data Map k a
-
-instance (Show k, Show a) => Show (Map k a)
-
-size :: Map k a -> Int
-lookup :: Ord k => k -> Map k a -> Maybe a
-empty :: Map k a
-insert :: Ord k => k -> a -> Map k a -> Map k a
-delete :: Ord k => k -> Map k a -> Map k a
-
-keysSet :: Map k a -> Set k
-fromSet :: (k -> a) -> Set k -> Map k a
diff --git a/testsuite/tests/cabal/sigcabal02/p/P.hs b/testsuite/tests/cabal/sigcabal02/p/P.hs
deleted file mode 100644
index dec6b41c94..0000000000
--- a/testsuite/tests/cabal/sigcabal02/p/P.hs
+++ /dev/null
@@ -1,12 +0,0 @@
-module P where
-
-import qualified Map
-import qualified Set
-
-foo = do
- let x = Map.insert 0 "foo"
- . Map.insert (6 :: Int) "foo"
- $ Map.empty
- print (Map.lookup 1 x)
- print (Set.size (Map.keysSet x))
- return x
diff --git a/testsuite/tests/cabal/sigcabal02/p/Set.hsig b/testsuite/tests/cabal/sigcabal02/p/Set.hsig
deleted file mode 100644
index 1713133365..0000000000
--- a/testsuite/tests/cabal/sigcabal02/p/Set.hsig
+++ /dev/null
@@ -1,13 +0,0 @@
-{-# LANGUAGE RoleAnnotations #-}
-module Set where
-
-type role Set nominal
-data Set a
-
-instance Show a => Show (Set a)
-
-size :: Set a -> Int
-member :: Ord a => a -> Set a -> Bool
-empty :: Set a
-insert :: Ord a => a -> Set a -> Set a
-delete :: Ord a => a -> Set a -> Set a
diff --git a/testsuite/tests/cabal/sigcabal02/p/p.cabal b/testsuite/tests/cabal/sigcabal02/p/p.cabal
deleted file mode 100644
index bb3b2a4463..0000000000
--- a/testsuite/tests/cabal/sigcabal02/p/p.cabal
+++ /dev/null
@@ -1,14 +0,0 @@
-name: p
-version: 1.0
-license-file: LICENSE
-author: Edward Z. Yang
-maintainer: ezyang@cs.stanford.edu
-build-type: Simple
-cabal-version: >=1.20
-
-library
- exposed-modules: P
- exposed-signatures: Map
- required-signatures: Set
- build-depends: base
- default-language: Haskell2010
diff --git a/testsuite/tests/cabal/sigcabal02/q/LICENSE b/testsuite/tests/cabal/sigcabal02/q/LICENSE
deleted file mode 100644
index e69de29bb2..0000000000
--- a/testsuite/tests/cabal/sigcabal02/q/LICENSE
+++ /dev/null
diff --git a/testsuite/tests/cabal/sigcabal02/q/Map.hsig b/testsuite/tests/cabal/sigcabal02/q/Map.hsig
deleted file mode 100644
index 40fd0bc74c..0000000000
--- a/testsuite/tests/cabal/sigcabal02/q/Map.hsig
+++ /dev/null
@@ -1,7 +0,0 @@
-{-# LANGUAGE RoleAnnotations #-}
-module Map where
-
-type role Map nominal representational
-data Map k a
-
-member :: Ord k => k -> Map k a -> Bool
diff --git a/testsuite/tests/cabal/sigcabal02/q/Q.hs b/testsuite/tests/cabal/sigcabal02/q/Q.hs
deleted file mode 100644
index ba55fb97b7..0000000000
--- a/testsuite/tests/cabal/sigcabal02/q/Q.hs
+++ /dev/null
@@ -1,7 +0,0 @@
-module Q where
-
-import qualified Map
-import Map(Map)
-
-mymember :: Int -> Map Int a -> Bool
-mymember k m = Map.member k m || Map.member (k + 1) m
diff --git a/testsuite/tests/cabal/sigcabal02/q/q.cabal b/testsuite/tests/cabal/sigcabal02/q/q.cabal
deleted file mode 100644
index 2f99c4403c..0000000000
--- a/testsuite/tests/cabal/sigcabal02/q/q.cabal
+++ /dev/null
@@ -1,13 +0,0 @@
-name: q
-version: 1.0
-license-file: LICENSE
-author: Edward Z. Yang
-maintainer: ezyang@cs.stanford.edu
-build-type: Simple
-cabal-version: >=1.20
-
-library
- exposed-modules: Q
- exposed-signatures: Map
- build-depends: base
- default-language: Haskell2010
diff --git a/testsuite/tests/cabal/sigcabal02/sigcabal02.stderr b/testsuite/tests/cabal/sigcabal02/sigcabal02.stderr
deleted file mode 100644
index 7c1f09239f..0000000000
--- a/testsuite/tests/cabal/sigcabal02/sigcabal02.stderr
+++ /dev/null
@@ -1,4 +0,0 @@
-
-ShouldFail.hs:1:8:
- Could not find module ‘Set’
- Use -v to see a list of the files searched for.
diff --git a/testsuite/tests/cabal/sigcabal02/sigcabal02.stdout b/testsuite/tests/cabal/sigcabal02/sigcabal02.stdout
deleted file mode 100644
index 48cb59e63a..0000000000
--- a/testsuite/tests/cabal/sigcabal02/sigcabal02.stdout
+++ /dev/null
@@ -1,5 +0,0 @@
-[1 of 1] Compiling Main ( Main.hs, Main.o )
-Linking Main ...
-Nothing
-2
-True