diff options
Diffstat (limited to 'testsuite/tests/module/base01')
-rw-r--r-- | testsuite/tests/module/base01/GHC/Base.hs | 25 | ||||
-rw-r--r-- | testsuite/tests/module/base01/GHC/Foo.hs | 7 | ||||
-rw-r--r-- | testsuite/tests/module/base01/Makefile | 14 | ||||
-rw-r--r-- | testsuite/tests/module/base01/all.T | 9 | ||||
-rw-r--r-- | testsuite/tests/module/base01/base01.stdout | 1 |
5 files changed, 56 insertions, 0 deletions
diff --git a/testsuite/tests/module/base01/GHC/Base.hs b/testsuite/tests/module/base01/GHC/Base.hs new file mode 100644 index 0000000000..9149f8544b --- /dev/null +++ b/testsuite/tests/module/base01/GHC/Base.hs @@ -0,0 +1,25 @@ + +module GHC.Base (module GHC.Base, Bool(..)) where + +import GHC.Prim +import GHC.Types + +default () + +class Eq a where + (==), (/=) :: a -> a -> Bool + + x /= y = not (x == y) + x == y = not (x /= y) + +instance Eq Bool where + False == False = True + True == True = True + _ == _ = False + +not :: Bool -> Bool +not True = False +not False = True + +inline x = x + diff --git a/testsuite/tests/module/base01/GHC/Foo.hs b/testsuite/tests/module/base01/GHC/Foo.hs new file mode 100644 index 0000000000..c23ef0ceb3 --- /dev/null +++ b/testsuite/tests/module/base01/GHC/Foo.hs @@ -0,0 +1,7 @@ + +module GHC.Foo where + +import GHC.Base + +foo = True == True + diff --git a/testsuite/tests/module/base01/Makefile b/testsuite/tests/module/base01/Makefile new file mode 100644 index 0000000000..f88e8a3e4d --- /dev/null +++ b/testsuite/tests/module/base01/Makefile @@ -0,0 +1,14 @@ +TOP=../../.. +include $(TOP)/mk/boilerplate.mk +include $(TOP)/mk/test.mk + +clean: + rm -f GHC/*.o + rm -f GHC/*.hi + +base01: + rm -f GHC/*.o + rm -f GHC/*.hi + '$(TEST_HC)' $(TEST_HC_OPTS) -XNoImplicitPrelude -package-name base -c GHC/Base.hs + '$(TEST_HC)' $(TEST_HC_OPTS) -XNoImplicitPrelude -package-name base --make GHC.Foo + diff --git a/testsuite/tests/module/base01/all.T b/testsuite/tests/module/base01/all.T new file mode 100644 index 0000000000..d0dbb2960d --- /dev/null +++ b/testsuite/tests/module/base01/all.T @@ -0,0 +1,9 @@ +setTestOpts(only_compiler_types(['ghc'])) + +test('base01', + [if_compiler_lt('ghc', '7.1', expect_fail), + normalise_slashes, + clean_cmd('$MAKE -s clean')], + run_command, + ['$MAKE -s base01 --no-print-directory']) + diff --git a/testsuite/tests/module/base01/base01.stdout b/testsuite/tests/module/base01/base01.stdout new file mode 100644 index 0000000000..9ab7d2124e --- /dev/null +++ b/testsuite/tests/module/base01/base01.stdout @@ -0,0 +1 @@ +[2 of 2] Compiling GHC.Foo ( GHC/Foo.hs, GHC/Foo.o ) |