[commit: testsuite] master: Follow changes in [7ab62490/base] (re #7633) (5af4e9c)

git at git.haskell.org git at git.haskell.org
Wed Sep 18 13:28:41 CEST 2013


Repository : ssh://git@git.haskell.org/testsuite

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/5af4e9c11883522c240f8a013ef5d7d499856d41/testsuite

>---------------------------------------------------------------

commit 5af4e9c11883522c240f8a013ef5d7d499856d41
Author: Herbert Valerio Riedel <hvr at gnu.org>
Date:   Wed Sep 18 13:27:14 2013 +0200

    Follow changes in [7ab62490/base] (re #7633)


>---------------------------------------------------------------

5af4e9c11883522c240f8a013ef5d7d499856d41
 tests/parser/should_compile/T2245.stderr    |    6 ++++--
 tests/polykinds/T6002.hs                    |    1 +
 tests/typecheck/should_compile/tc088.hs     |    3 ++-
 tests/typecheck/should_compile/tc175.stderr |    5 +++++
 tests/warnings/minimal/WarnMinimal.stderr   |    4 +++-
 5 files changed, 15 insertions(+), 4 deletions(-)

diff --git a/tests/parser/should_compile/T2245.stderr b/tests/parser/should_compile/T2245.stderr
index 3df2d6c..0002592 100644
--- a/tests/parser/should_compile/T2245.stderr
+++ b/tests/parser/should_compile/T2245.stderr
@@ -1,12 +1,14 @@
 
 T2245.hs:4:10: Warning:
     No explicit implementation for
-      ‛+’, ‛*’, ‛abs’, ‛signum’, and ‛fromInteger’
+      ‛+’, ‛*’, ‛abs’, ‛signum’, ‛fromInteger’, and (either ‛negate’
+                                                            or
+                                                            ‛-’)
     In the instance declaration for ‛Num T’
 
 T2245.hs:5:10: Warning:
     No explicit implementation for
-      ‛fromRational’
+      ‛fromRational’ and (either ‛recip’ or ‛/’)
     In the instance declaration for ‛Fractional T’
 
 T2245.hs:7:29: Warning:
diff --git a/tests/polykinds/T6002.hs b/tests/polykinds/T6002.hs
index a7f09ef..1d4fb7f 100644
--- a/tests/polykinds/T6002.hs
+++ b/tests/polykinds/T6002.hs
@@ -80,6 +80,7 @@ instance Num (Hidden Nat') where
   abs n = n
   Hide a + Hide b = Hide $ plus a b
   a * b = fromInteger $ toInteger a * toInteger b
+  negate a = error "negate(Hidden Nat')"
 
 instance Real (Hidden Nat') where
   toRational = toRational . toInteger
diff --git a/tests/typecheck/should_compile/tc088.hs b/tests/typecheck/should_compile/tc088.hs
index 05faeae..b6bf497 100644
--- a/tests/typecheck/should_compile/tc088.hs
+++ b/tests/typecheck/should_compile/tc088.hs
@@ -2,7 +2,8 @@
 
 module ShouldSucceed where
 
-instance Show (a->b)
+instance Show (a->b) where
+        show _ = error "attempt to show function"
 
 instance (Eq b) => Eq (a -> b) where
 	(==) f g = error "attempt to compare functions"
diff --git a/tests/typecheck/should_compile/tc175.stderr b/tests/typecheck/should_compile/tc175.stderr
new file mode 100644
index 0000000..982cee8
--- /dev/null
+++ b/tests/typecheck/should_compile/tc175.stderr
@@ -0,0 +1,5 @@
+
+tc175.hs:13:10: Warning:
+    No explicit implementation for
+      either ‛showsPrec’ or ‛show’
+    In the instance declaration for ‛Show (a -> b)’
diff --git a/tests/warnings/minimal/WarnMinimal.stderr b/tests/warnings/minimal/WarnMinimal.stderr
index fee6e10..09db27b 100644
--- a/tests/warnings/minimal/WarnMinimal.stderr
+++ b/tests/warnings/minimal/WarnMinimal.stderr
@@ -38,7 +38,9 @@ WarnMinimal.hs:92:1: Warning:
 
 WarnMinimal.hs:99:10: Warning:
     No explicit implementation for
-      ‛+’, ‛*’, ‛abs’, ‛signum’, and ‛fromInteger’
+      ‛+’, ‛*’, ‛abs’, ‛signum’, ‛fromInteger’, and (either ‛negate’
+                                                            or
+                                                            ‛-’)
     In the instance declaration for ‛Num Bool’
 
 WarnMinimal.hs:105:10: Warning:




More information about the ghc-commits mailing list