summaryrefslogtreecommitdiff
path: root/testsuite/tests/ghc-regress/safeHaskell/safeLanguage
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/ghc-regress/safeHaskell/safeLanguage')
-rw-r--r--testsuite/tests/ghc-regress/safeHaskell/safeLanguage/Makefile3
-rw-r--r--testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang01.hs8
-rw-r--r--testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang01.stderr3
-rw-r--r--testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang02.hs8
-rw-r--r--testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang02.stderr3
-rw-r--r--testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang03.hs10
-rw-r--r--testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang03.stderr4
-rw-r--r--testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang04.hs32
-rw-r--r--testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang04.stdout4
-rw-r--r--testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang05.hs34
-rw-r--r--testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang05.stdout4
-rw-r--r--testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang06.hs40
-rw-r--r--testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang06.stdout2
-rw-r--r--testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang06_A.hs24
-rw-r--r--testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang07.hs41
-rw-r--r--testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang07.stderr7
-rw-r--r--testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang07_A.hs24
-rw-r--r--testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang08.hs21
-rw-r--r--testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang08.stderr7
-rw-r--r--testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang08_A.c6
-rw-r--r--testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang09.hs10
-rw-r--r--testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang09.stderr1
-rw-r--r--testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang09_A.hs15
-rw-r--r--testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang09_B.hs19
-rw-r--r--testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang10.hs12
-rw-r--r--testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang10.stderr20
-rw-r--r--testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang10.stdout3
-rw-r--r--testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang10_A.hs16
-rw-r--r--testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang10_B.hs20
-rw-r--r--testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang11.hs12
-rw-r--r--testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang11.stdout1
-rw-r--r--testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang11_A.hs9
-rw-r--r--testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang11_B.hs16
-rw-r--r--testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang12.hs14
-rw-r--r--testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang12.stderr11
-rw-r--r--testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang12_B.hs18
-rw-r--r--testsuite/tests/ghc-regress/safeHaskell/safeLanguage/all.T19
37 files changed, 0 insertions, 501 deletions
diff --git a/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/Makefile b/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/Makefile
deleted file mode 100644
index 9ce1411567..0000000000
--- a/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/Makefile
+++ /dev/null
@@ -1,3 +0,0 @@
-TOP=../../../..
-include $(TOP)/mk/boilerplate.mk
-include $(TOP)/mk/test.mk \ No newline at end of file
diff --git a/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang01.hs b/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang01.hs
deleted file mode 100644
index 5920c03161..0000000000
--- a/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang01.hs
+++ /dev/null
@@ -1,8 +0,0 @@
-{-# LANGUAGE Safe, TemplateHaskell #-}
-
--- | Test SafeLanguage disables things
-module SafeLang01 where
-
-f :: Int
-f = 1
-
diff --git a/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang01.stderr b/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang01.stderr
deleted file mode 100644
index 18320eb727..0000000000
--- a/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang01.stderr
+++ /dev/null
@@ -1,3 +0,0 @@
-
-SafeLang01.hs:1:20:
- Warning: XTemplateHaskell is not allowed in Safe Haskell; ignoring XTemplateHaskell
diff --git a/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang02.hs b/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang02.hs
deleted file mode 100644
index 9bf1c82a09..0000000000
--- a/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang02.hs
+++ /dev/null
@@ -1,8 +0,0 @@
-{-# LANGUAGE Safe, GeneralizedNewtypeDeriving #-}
-
--- | Test SafeLanguage disables things
-module SafeLang02 where
-
-f :: Int
-f = 1
-
diff --git a/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang02.stderr b/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang02.stderr
deleted file mode 100644
index 6e3546968b..0000000000
--- a/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang02.stderr
+++ /dev/null
@@ -1,3 +0,0 @@
-
-<no location info>:
- Warning: -XGeneralizedNewtypeDeriving is not allowed in Safe Haskell; ignoring -XGeneralizedNewtypeDeriving
diff --git a/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang03.hs b/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang03.hs
deleted file mode 100644
index 4f3bce7e0a..0000000000
--- a/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang03.hs
+++ /dev/null
@@ -1,10 +0,0 @@
-{-# LANGUAGE Safe #-}
-{-# OPTIONS_GHC -fenable-rewrite-rules #-}
-
--- | Test SafeLanguage disables things
-module SafeLang03 where
-
-{-# RULES "f" f = undefined #-}
-f :: Int
-f = 1
-
diff --git a/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang03.stderr b/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang03.stderr
deleted file mode 100644
index fdcc5997d5..0000000000
--- a/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang03.stderr
+++ /dev/null
@@ -1,4 +0,0 @@
-
-SafeLang03.hs:7:11:
- Rule "f" ignored
- User defined rules are disabled under Safe Haskell
diff --git a/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang04.hs b/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang04.hs
deleted file mode 100644
index a9ac3619f3..0000000000
--- a/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang04.hs
+++ /dev/null
@@ -1,32 +0,0 @@
-{-# OPTIONS_GHC -fenable-rewrite-rules #-}
--- | Check rules work as normal without Safe
-module Main where
-
-data T = T1 | T2 | T3 deriving ( Eq, Ord, Show )
-
-lookupx :: Ord key => Show val => [(key,val)] -> key -> Maybe val
-lookupx [] _ = Nothing
-lookupx ((t,a):xs) t' | t == t' = Just a
- | otherwise = lookupx xs t'
-
-{-# RULES "lookupx/T" lookupx = tLookup #-}
-tLookup :: [(T,a)] -> T -> Maybe a
-tLookup [] _ = Nothing
-tLookup ((t,a):xs) t' | t /= t' = Just a
- | otherwise = tLookup xs t'
-
-space = [(T1,"a"),(T2,"b"),(T3,"c")]
-key = T3
-
-main = do
- putStrLn $ "looking for " ++ show key
- putStrLn $ "in space " ++ show space
- putStrLn $ "Found: " ++ show (fromMaybe "Not Found!" $ lookupx space key)
- let b | Just "c" <- lookupx space key = "YES"
- | otherwise = "NO"
- putStrLn $ "Rules Disabled: " ++ b
-
-fromMaybe :: a -> Maybe a -> a
-fromMaybe a Nothing = a
-fromMaybe _ (Just a) = a
-
diff --git a/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang04.stdout b/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang04.stdout
deleted file mode 100644
index b80e6135bd..0000000000
--- a/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang04.stdout
+++ /dev/null
@@ -1,4 +0,0 @@
-looking for T3
-in space [(T1,"a"),(T2,"b"),(T3,"c")]
-Found: "a"
-Rules Disabled: NO
diff --git a/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang05.hs b/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang05.hs
deleted file mode 100644
index 1dd9016152..0000000000
--- a/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang05.hs
+++ /dev/null
@@ -1,34 +0,0 @@
-{-# LANGUAGE Safe #-}
-{-# OPTIONS_GHC -fenable-rewrite-rules #-}
-
--- | Check rules are disabled under Safe
-module Main where
-
-data T = T1 | T2 | T3 deriving ( Eq, Ord, Show )
-
-lookupx :: Ord key => Show val => [(key,val)] -> key -> Maybe val
-lookupx [] _ = Nothing
-lookupx ((t,a):xs) t' | t == t' = Just a
- | otherwise = lookupx xs t'
-
-{-# RULES "lookupx/T" lookupx = tLookup #-}
-tLookup :: [(T,a)] -> T -> Maybe a
-tLookup [] _ = Nothing
-tLookup ((t,a):xs) t' | t /= t' = Just a
- | otherwise = tLookup xs t'
-
-space = [(T1,"a"),(T2,"b"),(T3,"c")]
-key = T3
-
-main = do
- putStrLn $ "looking for " ++ show key
- putStrLn $ "in space " ++ show space
- putStrLn $ "Found: " ++ show (fromMaybe "Not Found!" $ lookupx space key)
- let b | Just "c" <- lookupx space key = "YES"
- | otherwise = "NO"
- putStrLn $ "Rules Disabled: " ++ b
-
-fromMaybe :: a -> Maybe a -> a
-fromMaybe a Nothing = a
-fromMaybe _ (Just a) = a
-
diff --git a/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang05.stdout b/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang05.stdout
deleted file mode 100644
index 2334866860..0000000000
--- a/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang05.stdout
+++ /dev/null
@@ -1,4 +0,0 @@
-looking for T3
-in space [(T1,"a"),(T2,"b"),(T3,"c")]
-Found: "c"
-Rules Disabled: YES
diff --git a/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang06.hs b/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang06.hs
deleted file mode 100644
index 685846f150..0000000000
--- a/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang06.hs
+++ /dev/null
@@ -1,40 +0,0 @@
-{-# LANGUAGE GeneralizedNewtypeDeriving #-}
-
--- Here we allow it to succeed (No SAFE)
-
--- | We use newtype to create an isomorphic type to Int
--- with a reversed Ord dictionary. We now use the MinList
--- API of Y1 to create a new MinList. Then we use newtype
--- deriving to convert the newtype MinList to an Int
--- MinList. This final result breaks the invariants of
--- MinList which shouldn't be possible with the exposed
--- API of Y1.
-module Main where
-
-import SafeLang06_A
-
-class IntIso t where
- intIso :: c t -> c Int
-
-instance IntIso Int where
- intIso = id
-
-newtype Down a = Down a deriving (Eq, Show, IntIso)
-
-instance Ord a => Ord (Down a) where
- compare (Down a) (Down b) = compare b a
-
-forceInt :: MinList Int -> MinList Int
-forceInt = id
-
-a1, a2 :: MinList Int
-a1 = foldl insertMinList (newMinList $ head nums) (tail nums)
-a2 = forceInt $ intIso $ foldl (\x y -> insertMinList x $ Down y) (newMinList $ Down $ head nums) (tail nums)
-
-nums :: [Int]
-nums = [1,4,0,1,-5,2,3,5,-1,2,0,0,-4,-3,9]
-
-main = do
- printIntMinList a1
- printIntMinList a2
-
diff --git a/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang06.stdout b/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang06.stdout
deleted file mode 100644
index ed005737b7..0000000000
--- a/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang06.stdout
+++ /dev/null
@@ -1,2 +0,0 @@
-MinList Int :: MinList 1 [9,2,5,3,2,4]
-MinList Int :: MinList 1 [-3,-4,0,0,-1,-5,0]
diff --git a/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang06_A.hs b/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang06_A.hs
deleted file mode 100644
index d092ae7a1a..0000000000
--- a/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang06_A.hs
+++ /dev/null
@@ -1,24 +0,0 @@
-{-# LANGUAGE Trustworthy #-}
-
--- | Here we expose a MinList API that only allows elements
--- to be inserted into a list if they are at least greater
--- than an initial element the list is created with.
-module SafeLang06_A (
- MinList,
- newMinList,
- insertMinList,
- printIntMinList
- ) where
-
-data MinList a = MinList a [a]
-
-newMinList :: Ord a => a -> MinList a
-newMinList n = MinList n []
-
-insertMinList :: Ord a => MinList a -> a -> MinList a
-insertMinList s@(MinList m xs) n | n > m = MinList m (n:xs)
- | otherwise = s
-
-printIntMinList :: MinList Int -> IO ()
-printIntMinList (MinList min xs) = putStrLn $ "MinList Int :: MinList " ++ show min ++ " " ++ show xs
-
diff --git a/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang07.hs b/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang07.hs
deleted file mode 100644
index 006cd0ea08..0000000000
--- a/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang07.hs
+++ /dev/null
@@ -1,41 +0,0 @@
-{-# LANGUAGE Safe #-}
-{-# LANGUAGE GeneralizedNewtypeDeriving #-}
-
--- Here we stop it succeeding (SAFE)
-
--- | We use newtype to create an isomorphic type to Int
--- with a reversed Ord dictionary. We now use the MinList
--- API of Y1 to create a new MinList. Then we use newtype
--- deriving to convert the newtype MinList to an Int
--- MinList. This final result breaks the invariants of
--- MinList which shouldn't be possible with the exposed
--- API of Y1.
-module Main where
-
-import SafeLang07_A
-
-class IntIso t where
- intIso :: c t -> c Int
-
-instance IntIso Int where
- intIso = id
-
-newtype Down a = Down a deriving (Eq, Show, IntIso)
-
-instance Ord a => Ord (Down a) where
- compare (Down a) (Down b) = compare b a
-
-forceInt :: MinList Int -> MinList Int
-forceInt = id
-
-a1, a2 :: MinList Int
-a1 = foldl insertMinList (newMinList $ head nums) (tail nums)
-a2 = forceInt $ intIso $ foldl (\x y -> insertMinList x $ Down y) (newMinList $ Down $ head nums) (tail nums)
-
-nums :: [Int]
-nums = [1,4,0,1,-5,2,3,5,-1,2,0,0,-4,-3,9]
-
-main = do
- printIntMinList a1
- printIntMinList a2
-
diff --git a/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang07.stderr b/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang07.stderr
deleted file mode 100644
index 1218b29a6d..0000000000
--- a/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang07.stderr
+++ /dev/null
@@ -1,7 +0,0 @@
-
-<no location info>:
- Warning: -XGeneralizedNewtypeDeriving is not allowed in Safe Haskell; ignoring -XGeneralizedNewtypeDeriving
-
-SafeLang07.hs:15:1:
- Failed to load interface for `SafeLang07_A'
- Use -v to see a list of the files searched for.
diff --git a/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang07_A.hs b/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang07_A.hs
deleted file mode 100644
index 6ef49d5946..0000000000
--- a/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang07_A.hs
+++ /dev/null
@@ -1,24 +0,0 @@
-{-# LANGUAGE Trustworthy #-}
-
--- | Here we expose a MinList API that only allows elements
--- to be inserted into a list if they are at least greater
--- than an initial element the list is created with.
-module SafeLang07_A (
- MinList,
- newMinList,
- insertMinList,
- printIntMinList
- ) where
-
-data MinList a = MinList a [a]
-
-newMinList :: Ord a => a -> MinList a
-newMinList n = MinList n []
-
-insertMinList :: Ord a => MinList a -> a -> MinList a
-insertMinList s@(MinList m xs) n | n > m = MinList m (n:xs)
- | otherwise = s
-
-printIntMinList :: MinList Int -> IO ()
-printIntMinList (MinList min xs) = putStrLn $ "MinList Int :: MinList " ++ show min ++ " " ++ show xs
-
diff --git a/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang08.hs b/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang08.hs
deleted file mode 100644
index 7249c8d0ec..0000000000
--- a/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang08.hs
+++ /dev/null
@@ -1,21 +0,0 @@
-{-# LANGUAGE Safe #-}
-{-# LANGUAGE ForeignFunctionInterface #-}
-
--- | Make sure FFI must be IO type
-module Main where
-
-import Foreign.C
-
-foreign import ccall "SafeLang08_A" c_sin :: CDouble -> CDouble
-
-sinx :: Double -> Double
-sinx d = realToFrac $ c_sin $ realToFrac d
-
-x :: Double
-x = 0.8932
-
-main :: IO ()
-main = do
- putStrLn "Hello World"
- putStrLn $ "Sin of " ++ (show x) ++ " is " ++ (show $ sinx x)
-
diff --git a/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang08.stderr b/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang08.stderr
deleted file mode 100644
index fc7c7fa00d..0000000000
--- a/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang08.stderr
+++ /dev/null
@@ -1,7 +0,0 @@
-
-SafeLang08.hs:9:1:
- Unacceptable result type in foreign declaration: CDouble
- Safe Haskell is on, all FFI imports must be in the IO monad
- When checking declaration:
- foreign import ccall safe "static SafeLang08_A" c_sin
- :: CDouble -> CDouble
diff --git a/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang08_A.c b/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang08_A.c
deleted file mode 100644
index d77ebad560..0000000000
--- a/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang08_A.c
+++ /dev/null
@@ -1,6 +0,0 @@
-double sinyy (double d) {
- double (*y)(double) = 0x0;
- return y(d);
-}
-
-
diff --git a/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang09.hs b/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang09.hs
deleted file mode 100644
index 4e20f177bf..0000000000
--- a/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang09.hs
+++ /dev/null
@@ -1,10 +0,0 @@
-module Main where
-
-import SafeLang09_A -- trusted lib
-import SafeLang09_B -- untrusted plugin
-
-main = do
- let r = res [(1::Int)]
- putStrLn $ "Result: " ++ show r
- putStrLn $ "Result: " ++ show function
-
diff --git a/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang09.stderr b/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang09.stderr
deleted file mode 100644
index 27d951e959..0000000000
--- a/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang09.stderr
+++ /dev/null
@@ -1 +0,0 @@
-SafeLang09: This curry is poisoned!
diff --git a/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang09_A.hs b/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang09_A.hs
deleted file mode 100644
index 129c2c4b56..0000000000
--- a/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang09_A.hs
+++ /dev/null
@@ -1,15 +0,0 @@
-{-# LANGUAGE FlexibleInstances #-}
-
--- | Trusted library that unsafe plugins can use
-module SafeLang09_A where
-
-class Pos a where
- res :: a -> Bool
-
--- Any call to res with a list in out TCB
--- should use this method and never a more
--- specific one provided by an untrusted module
-instance Pos [a] where
- res _ = True
-
-
diff --git a/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang09_B.hs b/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang09_B.hs
deleted file mode 100644
index 76e0fe5a1c..0000000000
--- a/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang09_B.hs
+++ /dev/null
@@ -1,19 +0,0 @@
-{-# LANGUAGE FlexibleInstances #-}
-{-# LANGUAGE OverlappingInstances #-}
-
--- Untrusted plugin! Don't wan't it changing behaviour of our
--- trusted code
-module SafeLang09_B where
-
-import SafeLang09_A
-
-instance Pos a where
- res _ = False
-
-instance Pos [Int] where
- res _ = error "This curry is poisoned!"
-
-function :: Int
-function = 3
-
-
diff --git a/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang10.hs b/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang10.hs
deleted file mode 100644
index ff5c168cff..0000000000
--- a/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang10.hs
+++ /dev/null
@@ -1,12 +0,0 @@
-{-# LANGUAGE SafeImports #-}
-module Main where
-
-import safe SafeLang10_A -- trusted lib
-import safe SafeLang10_B -- untrusted plugin
-
-main = do
- let r = res [(1::Int)]
- putStrLn $ "Result: " ++ show r
- putStrLn $ "Result: " ++ show function
-
-
diff --git a/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang10.stderr b/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang10.stderr
deleted file mode 100644
index d9a671b08d..0000000000
--- a/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang10.stderr
+++ /dev/null
@@ -1,20 +0,0 @@
-[1 of 3] Compiling SafeLang10_A ( SafeLang10_A.hs, SafeLang10_A.o )
-[2 of 3] Compiling SafeLang10_B ( SafeLang10_B.hs, SafeLang10_B.o )
-[3 of 3] Compiling Main ( SafeLang10.hs, SafeLang10.o )
-
-SafeLang10.hs:8:13:
- Unsafe overlapping instances for Pos [Int]
- arising from a use of `res'
- The matching instance is:
- instance [overlap ok] [safe] Pos [Int]
- -- Defined at SafeLang10_B.hs:14:10-18
- It is compiled in a Safe module and as such can only
- overlap instances from the same module, however it
- overlaps the following instances from different modules:
- instance Pos [a] -- Defined at SafeLang10_A.hs:13:10-16
- In the expression: res [(1 :: Int)]
- In an equation for `r': r = res [(1 :: Int)]
- In the expression:
- do { let r = res ...;
- putStrLn $ "Result: " ++ show r;
- putStrLn $ "Result: " ++ show function }
diff --git a/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang10.stdout b/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang10.stdout
deleted file mode 100644
index 32f4c5bbce..0000000000
--- a/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang10.stdout
+++ /dev/null
@@ -1,3 +0,0 @@
-[1 of 3] Compiling SafeLang10_A ( SafeLang10_A.hs, SafeLang10_A.o )
-[2 of 3] Compiling SafeLang10_B ( SafeLang10_B.hs, SafeLang10_B.o )
-[3 of 3] Compiling Main ( SafeLang10.hs, SafeLang10.o )
diff --git a/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang10_A.hs b/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang10_A.hs
deleted file mode 100644
index 7be17b5ec0..0000000000
--- a/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang10_A.hs
+++ /dev/null
@@ -1,16 +0,0 @@
-{-# LANGUAGE FlexibleInstances #-}
-{-# LANGUAGE Trustworthy #-}
-
--- | Trusted library that unsafe plugins can use
-module SafeLang10_A where
-
-class Pos a where
- res :: a -> Bool
-
--- Any call to res with a list in out TCB
--- should use this method and never a more
--- specific one provided by an untrusted module
-instance Pos [a] where
- res _ = True
-
-
diff --git a/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang10_B.hs b/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang10_B.hs
deleted file mode 100644
index 5b9954c12e..0000000000
--- a/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang10_B.hs
+++ /dev/null
@@ -1,20 +0,0 @@
-{-# LANGUAGE FlexibleInstances #-}
-{-# LANGUAGE OverlappingInstances #-}
-{-# LANGUAGE Safe #-}
-
--- Untrusted plugin! Don't wan't it changing behaviour of our
--- trusted code
-module SafeLang10_B where
-
-import SafeLang10_A
-
-instance Pos a where
- res _ = False
-
-instance Pos [Int] where
- res _ = error "This curry is poisoned!"
-
-function :: Int
-function = 3
-
-
diff --git a/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang11.hs b/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang11.hs
deleted file mode 100644
index 11b32ec57c..0000000000
--- a/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang11.hs
+++ /dev/null
@@ -1,12 +0,0 @@
-{-# LANGUAGE TemplateHaskell #-}
-module Main where
-
-import SafeLang11_A
-import SafeLang11_B
-
-$(mkSimpleClass ''A)
-
-main = do
- let b = c :: A
- putStrLn $ "I have a value of A :: " ++ show b
-
diff --git a/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang11.stdout b/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang11.stdout
deleted file mode 100644
index 34f1bf217a..0000000000
--- a/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang11.stdout
+++ /dev/null
@@ -1 +0,0 @@
-I have a value of A :: A1 is secret!
diff --git a/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang11_A.hs b/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang11_A.hs
deleted file mode 100644
index 7eb818183c..0000000000
--- a/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang11_A.hs
+++ /dev/null
@@ -1,9 +0,0 @@
-{-# LANGUAGE Safe #-}
-module SafeLang11_A ( A ) where
-
-data A = A1 | A2
-
-instance Show A where
- show A1 = "A1 is secret!"
- show A2 = "A2 is secret!"
-
diff --git a/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang11_B.hs b/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang11_B.hs
deleted file mode 100644
index 8d81be6abc..0000000000
--- a/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang11_B.hs
+++ /dev/null
@@ -1,16 +0,0 @@
-{-# LANGUAGE TemplateHaskell #-}
-module SafeLang11_B ( Class(..), mkSimpleClass ) where
-
-import Language.Haskell.TH
-
-class Class a where
- c :: a
-
-mkSimpleClass :: Name -> Q [Dec]
-mkSimpleClass name = do
- TyConI (DataD [] dname [] cs _) <- reify name
- ((NormalC conname []):_) <- return cs
- ClassI (ClassD [] cname [_] [] [SigD mname _]) _ <- reify ''Class
- return [InstanceD [] (AppT (ConT cname) (ConT dname)) [FunD mname
- [Clause [] (NormalB (ConE conname)) []]]]
-
diff --git a/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang12.hs b/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang12.hs
deleted file mode 100644
index 5817e54095..0000000000
--- a/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang12.hs
+++ /dev/null
@@ -1,14 +0,0 @@
-{-# LANGUAGE Safe #-}
-{-# LANGUAGE TemplateHaskell #-}
-module Main where
-
-import SafeLang11_A
-import SafeLang12_B
-
-$(mkSimpleClass ''A)
-
-main = do
- let b = c :: A
- putStrLn $ "I have a value of A :: " ++ show b
-
-
diff --git a/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang12.stderr b/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang12.stderr
deleted file mode 100644
index 1466921b07..0000000000
--- a/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang12.stderr
+++ /dev/null
@@ -1,11 +0,0 @@
-
-SafeLang12.hs:2:14:
- Warning: XTemplateHaskell is not allowed in Safe Haskell; ignoring XTemplateHaskell
-
-SafeLang12_B.hs:2:14:
- Warning: XTemplateHaskell is not allowed in Safe Haskell; ignoring XTemplateHaskell
-
-SafeLang12_B.hs:3:8:
- File name does not match module name:
- Saw: `SafeLang11_B'
- Expected: `SafeLang12_B'
diff --git a/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang12_B.hs b/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang12_B.hs
deleted file mode 100644
index f6ce559448..0000000000
--- a/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/SafeLang12_B.hs
+++ /dev/null
@@ -1,18 +0,0 @@
-{-# LANGUAGE Safe #-}
-{-# LANGUAGE TemplateHaskell #-}
-module SafeLang11_B ( Class(..), mkSimpleClass ) where
-
-import Language.Haskell.TH
-
-class Class a where
- c :: a
-
-mkSimpleClass :: Name -> Q [Dec]
-mkSimpleClass name = do
- TyConI (DataD [] dname [] cs _) <- reify name
- ((NormalC conname []):_) <- return cs
- ClassI (ClassD [] cname [_] [] [SigD mname _]) _ <- reify ''Class
- return [InstanceD [] (AppT (ConT cname) (ConT dname)) [FunD mname
- [Clause [] (NormalB (ConE conname)) []]]]
-
-
diff --git a/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/all.T b/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/all.T
deleted file mode 100644
index 7074c0f75c..0000000000
--- a/testsuite/tests/ghc-regress/safeHaskell/safeLanguage/all.T
+++ /dev/null
@@ -1,19 +0,0 @@
-# Just do the normal way, SafeHaskell is all in the frontend
-def f( opts ):
- opts.only_ways = ['normal']
-
-setTestOpts(f)
-
-test('SafeLang01', normal, compile, ['-trust base'])
-test('SafeLang02', normal, compile, ['-trust base'])
-test('SafeLang03', normal, compile, ['-trust base'])
-test('SafeLang04', normal, compile_and_run, [''])
-test('SafeLang05', normal, compile_and_run, ['-trust base'])
-test('SafeLang06', normal, compile_and_run, [''])
-test('SafeLang07', normal, compile_fail, [''])
-test('SafeLang08', normal, compile_fail, [''])
-test('SafeLang09', exit_code(1), compile_and_run, [''])
-test('SafeLang10', normal, compile_fail, ['--make -trust base'])
-test('SafeLang11', req_interp, compile_and_run, ['--make -trust base'])
-test('SafeLang12', normal, compile_fail, ['--make -trust base'])
-