+
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 `+'
in an instance declaration for `Num'
-
-
--- /dev/null
+-- !!! Checking that both import lists and 'hiding' lists might
+-- !!! be empty.
+module ShouldSucceed where
+
+import List ()
+import List hiding ()
+
+x :: Int
+x = 1
+
--- /dev/null
+-- !!! Checking that empty declarations are permitted.
+module ShouldSucceed where
+
+
+class Foo a where
+
+class Foz a
+
+x = 2 where
+y = 3
+
+instance Foo Int where
--- /dev/null
+-- !!! Checking that empty contexts are permitted.
+module ShouldSucceed where
+
+data () => Foo a = Foo a
+
+newtype () => Bar = Bar Int
+
+f :: () => Int -> Int
+f = (+1)
+
+
+class () => Fob a where
+
+instance () => Fob Int where
+instance () => Fob Float
+
--- /dev/null
+-- !!! Checking what's legal in the body of a class declaration.
+module ShouldSucceed where
+
+class Foo a where {
+ (--<>--) :: a -> a -> Int ;
+ infixl 5 --<>-- ;
+ (--<>--) _ _ = 2 ; -- empty decl at the end.
+};
+
+
--- /dev/null
+-- !!! Checking that qualified method names are legal in instance body.
+module ShouldSucceed where
+
+import Prelude hiding (Eq, (==))
+import Prelude as P (Eq,(==))
+
+data Foo = Foo Int Integer
+
+instance P.Eq Foo where
+ (Foo a1 b1) P.== (Foo a2 b2) = a1 P.== a2 && b1 P.== b2
+
+
+