Commit ca32a1e4 authored by Simon Peyton Jones's avatar Simon Peyton Jones
Browse files

Merge into monad-comp branch

parents 8e967dcb fd254851
......@@ -8,9 +8,13 @@
# -----------------------------------------------------------------------------
# specific generated files
......@@ -82,3 +86,4 @@ tests/ghc-regress/th/TH_import_loop/ModuleA.o-boot
......@@ -24,7 +24,7 @@ cabal01:
'$(TEST_HC)' --make -o setup Setup.lhs -v0
'$(GHC_PKG)' init local.db
./setup configure -v0 --prefix=$(PREFIX) --with-compiler='$(TEST_HC)' --with-hc-pkg='$(GHC_PKG)' --package-db=local.db $(PROF)
./setup configure -v0 --prefix=$(PREFIX) --with-compiler='$(TEST_HC)' --ghc-options='$(TEST_HC_OPTS)' --with-hc-pkg='$(GHC_PKG)' --package-db=local.db $(PROF)
./setup build -v0
./setup copy -v0
echo install1:
......@@ -4,7 +4,7 @@ include $(TOP)/mk/
CABAL_SETUP = $(FPTOOLS_TOP_ABS)/libraries/Cabal/cabal-setup/cabal-setup
CONFIG_ARGS = --with-compiler=$(TEST_HC) --with-hc-pkg=$(GHC_PKG)
CONFIG_ARGS = --with-compiler=$(TEST_HC) --ghc-options='$(TEST_HC_OPTS)' --with-hc-pkg=$(GHC_PKG)
# We have 3 packages, P-1.0, P-2.0, and Q. Q depends on P-1.0.
# We have an executable R, that depends on P-2.0 and Q, so the resulting
......@@ -20,17 +20,17 @@ cabal03: clean
'$(GHC_PKG)' init tmp.d
'$(TEST_HC)' -v0 --make Setup
cd p && $(SETUP) clean
cd p && $(SETUP) configure --with-ghc='$(TEST_HC)' --package-db=../tmp.d --disable-optimisation --ghc-pkg-option=--force
cd p && $(SETUP) configure --with-ghc='$(TEST_HC)' --ghc-options='$(TEST_HC_OPTS)' --package-db=../tmp.d --disable-optimisation --ghc-pkg-option=--force
cd p && $(SETUP) build
cd p && $(SETUP) register
cd q && $(SETUP) configure --with-ghc='$(TEST_HC)' --package-db=../tmp.d --ghc-pkg-option=--force
cd q && $(SETUP) configure --with-ghc='$(TEST_HC)' --ghc-options='$(TEST_HC_OPTS)' --package-db=../tmp.d --ghc-pkg-option=--force
cd q && $(SETUP) build
cd q && $(SETUP) register
cd p && $(SETUP) clean
cd p && $(SETUP) configure --with-ghc='$(TEST_HC)' --package-db=../tmp.d --ghc-pkg-option=--force
cd p && $(SETUP) configure --with-ghc='$(TEST_HC)' --ghc-options='$(TEST_HC_OPTS)' --package-db=../tmp.d --ghc-pkg-option=--force
cd p && $(SETUP) build
cd p && $(SETUP) register
cd r && ! ../Setup configure --with-ghc='$(TEST_HC)' --package-db=../tmp.d --ghc-pkg-option=--force
cd r && ! ../Setup configure --with-ghc='$(TEST_HC)' --ghc-options='$(TEST_HC_OPTS)' --package-db=../tmp.d --ghc-pkg-option=--force
ifneq "$(CLEANUP)" ""
$(MAKE) clean
......@@ -11,7 +11,7 @@ cabal04:
$(MAKE) clean
'$(TEST_HC)' -v0 --make Setup
$(SETUP) clean
$(SETUP) configure --with-ghc='$(TEST_HC)' $(PROF) $(DYN)
$(SETUP) configure --with-ghc='$(TEST_HC)' --ghc-options='$(TEST_HC_OPTS)' $(PROF) $(DYN)
$(SETUP) build 2> err
! grep -v "Creating library file" err
ifneq "$(CLEANUP)" ""
{-# LANGUAGE OverloadedStrings #-}
module BadWarning where
data MyString = MyString String
f1 (MyString "a") = undefined
f1 (MyString "bb") = undefined
f1 _ = undefined
f2 (MyString "aa") = undefined
f2 (MyString "bb") = undefined
f2 _ = undefined
-- Genuine overlap here!
f3(MyString ('a':_)) = undefined
f3 (MyString "a") = undefined
f3 _ = undefined
Warning: Pattern match(es) are overlapped
In an equation for `f3': f3 (MyString "a") = ...
......@@ -83,3 +83,4 @@ test('T4870',
extra_clean(['T4870a.hi', 'T4870a.o'])],
['T4870', '-v0'])
test('T5117', normal, compile, [''])
<no location info>:
Warning: -O conflicts with --interactive; -O ignored.
......@@ -19,6 +19,8 @@ LOCAL_PKGCONF=local.package.conf
LOCAL_GHC_PKG = '$(GHC_PKG)' --no-user-package-conf -f $(LOCAL_PKGCONF)
rm -f A.hi A.o B/C.hi B/C.o Main.hi Main.o pkg.conf
rm -f pwd pwd.exe pwd.exe.manifest pwd.hi pwd.o
'$(TEST_HC)' $(TEST_HC_OPTS) --make pwd -v0
'$(TEST_HC)' $(TEST_HC_OPTS) --make -package-name test-1.0 B.C -fforce-recomp -v0
rm -f pkg.conf
module T5084 where
-- Superclass method pragma test (fail)
class Foo a where
bar :: a -> a
{-# INLINE bar #-}
-- Instance test (ok)
instance Foo Int where
bar = (+1)
{-# INLINE bar #-}
The INLINE pragma for default method `bar' lacks an accompanying binding
......@@ -235,3 +235,5 @@ test('mc23', normal, compile_fail, [''])
test('mc24', normal, compile_fail, [''])
test('mc25', normal, compile_fail, [''])
test('tcfail207', normal, compile_fail, [''])
test('T5084', normal, compile_fail, [''])
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment