[project @ 1999-02-15 17:57:29 by sof]
authorsof <unknown>
Mon, 15 Feb 1999 17:57:30 +0000 (17:57 +0000)
committersof <unknown>
Mon, 15 Feb 1999 17:57:30 +0000 (17:57 +0000)
Empty export list regression test

ghc/tests/reader/should_compile/Makefile
ghc/tests/reader/should_compile/read014.hs [new file with mode: 0644]
ghc/tests/reader/should_compile/read014.stderr [new file with mode: 0644]

index 965c885..71d1bba 100644 (file)
@@ -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 (file)
index 0000000..b8bfe7f
--- /dev/null
@@ -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 (file)
index 0000000..1a4da3b
--- /dev/null
@@ -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'
+
+