[commit: ghc] master: Testsuite: delete -fesc tests (32c0aba)
git at git.haskell.org
git at git.haskell.org
Thu Apr 28 21:09:32 UTC 2016
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/32c0aba19d2b482e6ac2dffdb54d50a1472f7d07/ghc
>---------------------------------------------------------------
commit 32c0aba19d2b482e6ac2dffdb54d50a1472f7d07
Author: Thomas Miedema <thomasmiedema at gmail.com>
Date: Mon Apr 25 20:28:23 2016 +0200
Testsuite: delete -fesc tests
The -fesc flag does not exist, and has never existed.
Also delete now unused config.compiler_tags, and 'Project version' never
contains a '-'.
Reviewed by: bgamari
Differential Revision: https://phabricator.haskell.org/D2138
>---------------------------------------------------------------
32c0aba19d2b482e6ac2dffdb54d50a1472f7d07
testsuite/config/ghc | 7 +++----
testsuite/driver/testglobals.py | 1 -
testsuite/driver/testlib.py | 3 ---
testsuite/tests/esc/F123.hs | 28 ----------------------------
testsuite/tests/esc/Makefile | 3 ---
testsuite/tests/esc/Sum.hs | 22 ----------------------
testsuite/tests/esc/TestData.hs | 37 -------------------------------------
testsuite/tests/esc/TestDataCon.hs | 25 -------------------------
testsuite/tests/esc/TestImport.hs | 27 ---------------------------
testsuite/tests/esc/TestList.hs | 24 ------------------------
testsuite/tests/esc/all.T | 5 -----
testsuite/tests/esc/synonym.hs | 10 ----------
12 files changed, 3 insertions(+), 189 deletions(-)
diff --git a/testsuite/config/ghc b/testsuite/config/ghc
index 7d32e35..26ce3bd 100644
--- a/testsuite/config/ghc
+++ b/testsuite/config/ghc
@@ -172,10 +172,9 @@ def get_compiler_info():
config.libdir = compilerInfoDict['LibDir']
- v = compilerInfoDict["Project version"].split('-')
- config.compiler_version = v[0]
- config.compiler_maj_version = re.sub('^([0-9]+\.[0-9]+).*',r'\1', v[0])
- config.compiler_tags = v[1:]
+ v = compilerInfoDict["Project version"]
+ config.compiler_version = v
+ config.compiler_maj_version = re.sub('^([0-9]+\.[0-9]+).*',r'\1', v)
# -fno-ghci-history was added in 7.3
if version_ge(config.compiler_version, '7.3'):
diff --git a/testsuite/driver/testglobals.py b/testsuite/driver/testglobals.py
index 6f8dd64..2c7f551 100644
--- a/testsuite/driver/testglobals.py
+++ b/testsuite/driver/testglobals.py
@@ -68,7 +68,6 @@ class TestConfig:
# Compiler version info
self.compiler_version = ''
self.compiler_maj_version = ''
- self.compiler_tags = []
# Flags we always give to this compiler
self.compiler_always_flags = []
diff --git a/testsuite/driver/testlib.py b/testsuite/driver/testlib.py
index bba3516..c69c874 100644
--- a/testsuite/driver/testlib.py
+++ b/testsuite/driver/testlib.py
@@ -375,9 +375,6 @@ def compiler_profiled( ):
def compiler_debugged( ):
return config.compiler_debugged
-def tag( t ):
- return t in config.compiler_tags
-
# ---
def high_memory_usage(name, opts):
diff --git a/testsuite/tests/esc/F123.hs b/testsuite/tests/esc/F123.hs
deleted file mode 100644
index 6aaad16..0000000
--- a/testsuite/tests/esc/F123.hs
+++ /dev/null
@@ -1,28 +0,0 @@
-module F123 where
-
-
-
-data A = A1 | A2
-data B = B1 | B2
-
-{-# CONTRACT h1 :: {x | noA2 x} -> {r | yesA2 r} #-}
-h1 :: A -> A
-h1 A1 = A2
-
-
-noA2 A1 = True
-noA2 A2 = False
-
-yesA2 A1 = False
-yesA2 A2 = True
-
-f3 x y = case y of
- B1 -> f2 x y
-
-f2 x y = case y of
- B1 -> f1 x
-
-f1 x = h1 A2
-
-
-
diff --git a/testsuite/tests/esc/Makefile b/testsuite/tests/esc/Makefile
deleted file mode 100644
index 9a36a1c..0000000
--- a/testsuite/tests/esc/Makefile
+++ /dev/null
@@ -1,3 +0,0 @@
-TOP=../..
-include $(TOP)/mk/boilerplate.mk
-include $(TOP)/mk/test.mk
diff --git a/testsuite/tests/esc/Sum.hs b/testsuite/tests/esc/Sum.hs
deleted file mode 100644
index 2b9ee29..0000000
--- a/testsuite/tests/esc/Sum.hs
+++ /dev/null
@@ -1,22 +0,0 @@
-module Sum where
-
-{-- {-# SPECIALISE f :: Int -> Int #-}
--- {-# CONTRACT f :: x:{y | y > 0} -> {r | r == x + 1} #-}
--- {-# CONTRACT f :: x:{y | y > 0} -> {y | y > 0} -> {r | r == x + 1} #-}
--- {-# CONTRACT f :: any -> {y | y > 0} #-}
--- {-# CONTRACT f :: {y | y > 0} -> _ #-}
-{-# CONTRACT inc :: {y | y > 0} -> {r | r > 1} #-}
-inc :: Int -> Int
-inc x = x + 1
-
--}
--- {-# CONTRACT sum2 :: x:{y | y > 0} -> {y | y > x} -> {r | r > 0} #-}
--- {-# CONTRACT sum2 :: x:{y | y > 0} -> {y | y > x} -> _ #-}
-sum2 :: Int -> Int -> Int
-sum2 x y = x + y
-
-{-
-t1 = inc 5
-t2a = sum2 (inc 5) 2
-t2b = sum2 (inc 5) 6
--}
diff --git a/testsuite/tests/esc/TestData.hs b/testsuite/tests/esc/TestData.hs
deleted file mode 100644
index 045f3c9..0000000
--- a/testsuite/tests/esc/TestData.hs
+++ /dev/null
@@ -1,37 +0,0 @@
-module TestData where
-
-data A = A1 | A2
-
-
--- If we put noA2 and yesA2 here, they are out of scope
--- in ESC's eyes. i.e. they are not in EscEnv.vals
-{-
-noA2 A1 = True
-noA2 A2 = False
-
-yesA2 A1 = False
-yesA2 A2 = True
--}
-
-{-# CONTRACT h1 :: {x | noA2 x} -> {r | yesA2 r} #-}
-h1 :: A -> A
-h1 A1 = A2
-
-g1 :: A -> A
-g1 A1 = A1
-g1 A2 = A1
-
-{-# CONTRACT h2 :: {x | not1 (noA2 x)} -> {r | not1 (yesA2 r)} #-}
-h2 :: A -> A
-h2 A2 = A1
-
-noA2 A1 = True
-noA2 A2 = False
-
-yesA2 A1 = False
-yesA2 A2 = True
-
-not1 True = False
-not1 False = True
-
-test = h1 (g1 A2)
diff --git a/testsuite/tests/esc/TestDataCon.hs b/testsuite/tests/esc/TestDataCon.hs
deleted file mode 100644
index e5b66eb..0000000
--- a/testsuite/tests/esc/TestDataCon.hs
+++ /dev/null
@@ -1,25 +0,0 @@
-module TestDataCon where
-
-{-# CONTRACT g1 :: ({x | x>0}, any) -> {r | r>0} #-}
-g1 :: (Int, Int) -> Int
-g1 (x,y) = x
-{-# CONTRACT g2 :: (any, {y | y>0}) -> {r | r>0} #-}
-g2 :: (Int, Int) -> Int
-g2 (x,y) = y
-
-bad = error "bad!"
-
-t1 = g1 (5, bad)
-t2 = g2 (bad, 6)
-t3 = g1 (bad, 7)
-t4 = g1 (-1, 6) -- seems inlining is done.
-
-{-
-data A a = B a | C a Int
-
-{-# CONTRACT g :: B {x | x>0} -> any #-}
-g :: B Int -> Int
-g (B x) = x
-
-
--}
diff --git a/testsuite/tests/esc/TestImport.hs b/testsuite/tests/esc/TestImport.hs
deleted file mode 100644
index bf91eaf..0000000
--- a/testsuite/tests/esc/TestImport.hs
+++ /dev/null
@@ -1,27 +0,0 @@
-module TestImport where
-
-import TestList
-
-{-# CONTRACT t2 :: _ #-}
-t2 = head1 [True] -- same as TestList res2
-
-{-# CONTRACT t3 :: {x | True} #-}
-t3 = head1 [True] -- same as TestList.res3
-
-t4 = head1 [] -- same as TestList.res4
-
-t5 = head1 [True] -- same as TestList.res5
-
-t2a = res2
-t3a = res3
-t4a = res4
-t5a = res5
-
-{-# CONTRACT tail1 :: {xs | not1 (null1 xs)} -> {r | True} #-}
-tail1 :: [Int] -> [Int]
-tail1 (x:xs) = xs
-
-{-# CONTRACT tail2 :: {xs | not (null xs)} -> {r | True} #-}
-tail2 :: [Int] -> [Int]
-tail2 (x:xs) = xs
-
diff --git a/testsuite/tests/esc/TestList.hs b/testsuite/tests/esc/TestList.hs
deleted file mode 100644
index 66f9df2..0000000
--- a/testsuite/tests/esc/TestList.hs
+++ /dev/null
@@ -1,24 +0,0 @@
-module TestList where
-
-{-# CONTRACT head1 :: {ys | not1 (null1 ys)} -> {r | True} #-}
--- {-# CONTRACT head1 :: {xs | not (null xs)} -> {r | True} #-}
-head1 :: [Bool] -> Bool
-head1 (x:xs) = x
-
-not1 True = False
-not1 False = True
-
-null1 [] = True
-null1 xs = False
-
-{-# CONTRACT res2 :: _ #-}
-res2 = head1 [True]
-
-{-# CONTRACT res3 :: {x | True} #-}
-res3 = head1 [True]
-
-res4 = head1 []
-
-res5 = head1 [True]
-
-
diff --git a/testsuite/tests/esc/all.T b/testsuite/tests/esc/all.T
deleted file mode 100644
index 31a4ba5..0000000
--- a/testsuite/tests/esc/all.T
+++ /dev/null
@@ -1,5 +0,0 @@
-esc = unless(tag('esc'), skip)
-
-test('TestList', esc, compile, ['-fesc'])
-test('TestImport', esc, compile, ['-fesc'])
-test('TestData', esc, compile, ['-fesc'])
diff --git a/testsuite/tests/esc/synonym.hs b/testsuite/tests/esc/synonym.hs
deleted file mode 100644
index 24b035c..0000000
--- a/testsuite/tests/esc/synonym.hs
+++ /dev/null
@@ -1,10 +0,0 @@
-{-# TYPE nat = {x | x > 0} #-}
-{-# TYPE notNull = {xs | not (null xs)} #-}
-
-{-# CONTRACT f :: nat -> nat #-}
-f :: Int -> Int
-f x = x
-
-{-# CONTRACT g :: notNull -> any #-}
-g :: [Int] -> Int
-g (x:xs) = x
More information about the ghc-commits
mailing list