From ca56dadacc0b8dbeb76fe2417f676b9a83221235 Mon Sep 17 00:00:00 2001 From: sof Date: Mon, 15 Feb 1999 17:57:30 +0000 Subject: [PATCH] [project @ 1999-02-15 17:57:29 by sof] Empty export list regression test --- ghc/tests/reader/should_compile/Makefile | 1 + ghc/tests/reader/should_compile/read014.hs | 8 +++++++ ghc/tests/reader/should_compile/read014.stderr | 30 ++++++++++++++++++++++++ 3 files changed, 39 insertions(+) create mode 100644 ghc/tests/reader/should_compile/read014.hs create mode 100644 ghc/tests/reader/should_compile/read014.stderr diff --git a/ghc/tests/reader/should_compile/Makefile b/ghc/tests/reader/should_compile/Makefile index 965c885..71d1bba 100644 --- a/ghc/tests/reader/should_compile/Makefile +++ b/ghc/tests/reader/should_compile/Makefile @@ -7,5 +7,6 @@ SRC_HC_OPTS += -noC -dcore-lint read004_HC_OPTS = -fno-implicit-prelude read012_HC_OPTS += -O -funfold-casms-in-hi-file -fglasgow-exts read013_HC_OPTS += -O -funfold-casms-in-hi-file -fglasgow-exts +read014_HC_OPTS += -Wall include $(TOP)/mk/target.mk diff --git a/ghc/tests/reader/should_compile/read014.hs b/ghc/tests/reader/should_compile/read014.hs new file mode 100644 index 0000000..b8bfe7f --- /dev/null +++ b/ghc/tests/reader/should_compile/read014.hs @@ -0,0 +1,8 @@ +-- !!! Empty export lists are legal (and useful.) +module T () where + +ng1 x y = negate y + +instance (Num a, Num b) => Num (a,b) + where + negate (a,b) = (ng 'c' a, ng1 'c' b) where ng x y = negate y diff --git a/ghc/tests/reader/should_compile/read014.stderr b/ghc/tests/reader/should_compile/read014.stderr new file mode 100644 index 0000000..1a4da3b --- /dev/null +++ b/ghc/tests/reader/should_compile/read014.stderr @@ -0,0 +1,30 @@ + +read014.hs:2: Warning: definition but no type signature for `ng1' + +read014.hs:4: Warning: Defined but not used: x + +read014.hs:8: Warning: Defined but not used: x + + + +read014.hs:8: + Warning: No explicit method nor default method for `fromInteger' + in an instance declaration for `Num' + +read014.hs:8: + Warning: No explicit method nor default method for `signum' + in an instance declaration for `Num' + +read014.hs:8: + Warning: No explicit method nor default method for `abs' + in an instance declaration for `Num' + +read014.hs:8: + Warning: No explicit method nor default method for `*' + in an instance declaration for `Num' + +read014.hs:8: + Warning: No explicit method nor default method for `+' + in an instance declaration for `Num' + + -- 1.7.10.4