diff options
Diffstat (limited to 'testsuite/tests/ghci/scripts/Defer02.stderr')
-rw-r--r-- | testsuite/tests/ghci/scripts/Defer02.stderr | 267 |
1 files changed, 125 insertions, 142 deletions
diff --git a/testsuite/tests/ghci/scripts/Defer02.stderr b/testsuite/tests/ghci/scripts/Defer02.stderr index 48ddf4b598..83e9f7d157 100644 --- a/testsuite/tests/ghci/scripts/Defer02.stderr +++ b/testsuite/tests/ghci/scripts/Defer02.stderr @@ -1,195 +1,178 @@ ../../typecheck/should_run/Defer01.hs:11:40: warning: - Couldn't match type ‘Char’ with ‘[Char]’ - Expected type: String - Actual type: Char - In the first argument of ‘putStr’, namely ‘','’ - In the second argument of ‘(>>)’, namely ‘putStr ','’ - In the expression: putStr "Hello World" >> putStr ',' + • Couldn't match type ‘Char’ with ‘[Char]’ + Expected type: String + Actual type: Char + • In the first argument of ‘putStr’, namely ‘','’ + In the second argument of ‘(>>)’, namely ‘putStr ','’ + In the expression: putStr "Hello World" >> putStr ',' ../../typecheck/should_run/Defer01.hs:14:5: warning: - Couldn't match expected type ‘Int’ with actual type ‘Char’ - In the expression: 'p' - In an equation for ‘a’: a = 'p' - -../../typecheck/should_run/Defer01.hs:18:9: warning: - No instance for (Eq B) arising from a use of ‘==’ - In the expression: x == x - In an equation for ‘b’: b x = x == x + • Couldn't match expected type ‘Int’ with actual type ‘Char’ + • In the expression: 'p' + In an equation for ‘a’: a = 'p' ../../typecheck/should_run/Defer01.hs:25:4: warning: - Couldn't match type ‘Int’ with ‘Bool’ - Inaccessible code in - a pattern with constructor: C2 :: Bool -> C Bool, - in an equation for ‘c’ - In the pattern: C2 x - In an equation for ‘c’: c (C2 x) = True + • Couldn't match type ‘Int’ with ‘Bool’ + Inaccessible code in + a pattern with constructor: C2 :: Bool -> C Bool, + in an equation for ‘c’ + • In the pattern: C2 x + In an equation for ‘c’: c (C2 x) = True ../../typecheck/should_run/Defer01.hs:28:5: warning: - No instance for (Num (a -> a)) arising from the literal ‘1’ - (maybe you haven't applied a function to enough arguments?) - In the expression: 1 - In an equation for ‘d’: d = 1 + • No instance for (Num (a -> a)) arising from the literal ‘1’ + (maybe you haven't applied a function to enough arguments?) + • In the expression: 1 + In an equation for ‘d’: d = 1 ../../typecheck/should_run/Defer01.hs:31:5: warning: - Couldn't match expected type ‘Char -> t’ with actual type ‘Char’ - The function ‘e’ is applied to one argument, - but its type ‘Char’ has none - In the expression: e 'q' - In an equation for ‘f’: f = e 'q' - Relevant bindings include - f :: t (bound at ../../typecheck/should_run/Defer01.hs:31:1) + • Couldn't match expected type ‘Char -> t’ with actual type ‘Char’ + • The function ‘e’ is applied to one argument, + but its type ‘Char’ has none + In the expression: e 'q' + In an equation for ‘f’: f = e 'q' + • Relevant bindings include + f :: t (bound at ../../typecheck/should_run/Defer01.hs:31:1) ../../typecheck/should_run/Defer01.hs:34:8: warning: - Couldn't match expected type ‘Char’ with actual type ‘a’ - ‘a’ is a rigid type variable bound by + • Couldn't match expected type ‘Char’ with actual type ‘a’ + ‘a’ is a rigid type variable bound by the type signature for: - h :: a -> (Char, Char) + h :: forall a. a -> (Char, Char) at ../../typecheck/should_run/Defer01.hs:33:6 - In the expression: x - In the expression: (x, 'c') - Relevant bindings include - x :: a (bound at ../../typecheck/should_run/Defer01.hs:34:3) - h :: a -> (Char, Char) - (bound at ../../typecheck/should_run/Defer01.hs:34:1) + • In the expression: x + In the expression: (x, 'c') + • Relevant bindings include + x :: a (bound at ../../typecheck/should_run/Defer01.hs:34:3) + h :: a -> (Char, Char) + (bound at ../../typecheck/should_run/Defer01.hs:34:1) ../../typecheck/should_run/Defer01.hs:39:17: warning: - Couldn't match expected type ‘Bool’ with actual type ‘T a’ - In the first argument of ‘not’, namely ‘(K a)’ - In the expression: (not (K a)) - Relevant bindings include - a :: a (bound at ../../typecheck/should_run/Defer01.hs:39:3) - i :: a -> () (bound at ../../typecheck/should_run/Defer01.hs:39:1) + • Couldn't match expected type ‘Bool’ with actual type ‘T a’ + • In the first argument of ‘not’, namely ‘(K a)’ + In the expression: (not (K a)) + • Relevant bindings include + a :: a (bound at ../../typecheck/should_run/Defer01.hs:39:3) + i :: a -> () (bound at ../../typecheck/should_run/Defer01.hs:39:1) ../../typecheck/should_run/Defer01.hs:43:5: warning: - No instance for (MyClass a1) arising from a use of ‘myOp’ - In the expression: myOp 23 - In an equation for ‘j’: j = myOp 23 + • No instance for (MyClass a1) arising from a use of ‘myOp’ + • In the expression: myOp 23 + In an equation for ‘j’: j = myOp 23 ../../typecheck/should_run/Defer01.hs:43:10: warning: - Ambiguous type variable ‘a1’ arising from the literal ‘23’ - prevents the constraint ‘(Num a1)’ from being solved. - Probable fix: use a type annotation to specify what ‘a1’ should be. - These potential instances exist: - instance Num Integer -- Defined in ‘GHC.Num’ - instance Num Double -- Defined in ‘GHC.Float’ - instance Num Float -- Defined in ‘GHC.Float’ - ...plus two others - (use -fprint-potential-instances to see them all) - In the first argument of ‘myOp’, namely ‘23’ - In the expression: myOp 23 - In an equation for ‘j’: j = myOp 23 - -../../typecheck/should_run/Defer01.hs:45:6: warning: + • Ambiguous type variable ‘a1’ arising from the literal ‘23’ + prevents the constraint ‘(Num a1)’ from being solved. + Probable fix: use a type annotation to specify what ‘a1’ should be. + These potential instances exist: + instance Num Integer -- Defined in ‘GHC.Num’ + instance Num Double -- Defined in ‘GHC.Float’ + instance Num Float -- Defined in ‘GHC.Float’ + ...plus two others + (use -fprint-potential-instances to see them all) + • In the first argument of ‘myOp’, namely ‘23’ + In the expression: myOp 23 + In an equation for ‘j’: j = myOp 23 + +../../typecheck/should_run/Defer01.hs:45:1: warning: Couldn't match type ‘Int’ with ‘Bool’ Inaccessible code in the type signature for: k :: (Int ~ Bool) => Int -> Bool - In the ambiguity check for the type signature for ‘k’: - k :: (Int ~ Bool) => Int -> Bool - To defer the ambiguity check to use sites, enable AllowAmbiguousTypes - In the type signature for ‘k’: k :: (Int ~ Bool) => Int -> Bool - -../../typecheck/should_run/Defer01.hs:45:6: warning: - Couldn't match expected type ‘Bool’ with actual type ‘Int’ - In the ambiguity check for the type signature for ‘k’: - k :: (Int ~ Bool) => Int -> Bool - To defer the ambiguity check to use sites, enable AllowAmbiguousTypes - In the type signature for ‘k’: k :: (Int ~ Bool) => Int -> Bool ../../typecheck/should_run/Defer01.hs:45:6: warning: - Couldn't match type ‘Int’ with ‘Bool’ - Inaccessible code in - the type signature for: + • Couldn't match type ‘Int’ with ‘Bool’ + Inaccessible code in + the type signature for: + k :: (Int ~ Bool) => Int -> Bool + • In the ambiguity check for ‘k’ + To defer the ambiguity check to use sites, enable AllowAmbiguousTypes + In the type signature: k :: (Int ~ Bool) => Int -> Bool -../../typecheck/should_run/Defer01.hs:46:7: warning: - Couldn't match expected type ‘Bool’ with actual type ‘Int’ - In the expression: x - In an equation for ‘k’: k x = x - ../../typecheck/should_run/Defer01.hs:49:5: warning: - Couldn't match expected type ‘IO a0’ - with actual type ‘Char -> IO ()’ - Probable cause: ‘putChar’ is applied to too few arguments - In the first argument of ‘(>>)’, namely ‘putChar’ - In the expression: putChar >> putChar 'p' + • Couldn't match expected type ‘IO a0’ + with actual type ‘Char -> IO ()’ + • Probable cause: ‘putChar’ is applied to too few arguments + In the first argument of ‘(>>)’, namely ‘putChar’ + In the expression: putChar >> putChar 'p' *** Exception: ../../typecheck/should_run/Defer01.hs:11:40: error: - Couldn't match type ‘Char’ with ‘[Char]’ - Expected type: String - Actual type: Char - In the first argument of ‘putStr’, namely ‘','’ - In the second argument of ‘(>>)’, namely ‘putStr ','’ - In the expression: putStr "Hello World" >> putStr ',' + • Couldn't match type ‘Char’ with ‘[Char]’ + Expected type: String + Actual type: Char + • In the first argument of ‘putStr’, namely ‘','’ + In the second argument of ‘(>>)’, namely ‘putStr ','’ + In the expression: putStr "Hello World" >> putStr ',' (deferred type error) *** Exception: ../../typecheck/should_run/Defer01.hs:14:5: error: - Couldn't match expected type ‘Int’ with actual type ‘Char’ - In the expression: 'p' - In an equation for ‘a’: a = 'p' + • Couldn't match expected type ‘Int’ with actual type ‘Char’ + • In the expression: 'p' + In an equation for ‘a’: a = 'p' (deferred type error) *** Exception: ../../typecheck/should_run/Defer01.hs:18:9: error: - No instance for (Eq B) arising from a use of ‘==’ - In the expression: x == x - In an equation for ‘b’: b x = x == x + • No instance for (Eq B) arising from a use of ‘==’ + • In the expression: x == x + In an equation for ‘b’: b x = x == x (deferred type error) <interactive>:7:11: error: - Couldn't match type ‘Bool’ with ‘Int’ - Expected type: C Int - Actual type: C Bool - In the first argument of ‘c’, namely ‘(C2 True)’ - In the first argument of ‘print’, namely ‘(c (C2 True))’ + • Couldn't match type ‘Bool’ with ‘Int’ + Expected type: C Int + Actual type: C Bool + • In the first argument of ‘c’, namely ‘(C2 True)’ + In the first argument of ‘print’, namely ‘(c (C2 True))’ *** Exception: ../../typecheck/should_run/Defer01.hs:28:5: error: - No instance for (Num (a -> a)) arising from the literal ‘1’ - (maybe you haven't applied a function to enough arguments?) - In the expression: 1 - In an equation for ‘d’: d = 1 + • No instance for (Num (a -> a)) arising from the literal ‘1’ + (maybe you haven't applied a function to enough arguments?) + • In the expression: 1 + In an equation for ‘d’: d = 1 (deferred type error) *** Exception: ../../typecheck/should_run/Defer01.hs:31:5: error: - Couldn't match expected type ‘Char -> t’ with actual type ‘Char’ - The function ‘e’ is applied to one argument, - but its type ‘Char’ has none - In the expression: e 'q' - In an equation for ‘f’: f = e 'q' - Relevant bindings include - f :: t (bound at ../../typecheck/should_run/Defer01.hs:31:1) + • Couldn't match expected type ‘Char -> t’ with actual type ‘Char’ + • The function ‘e’ is applied to one argument, + but its type ‘Char’ has none + In the expression: e 'q' + In an equation for ‘f’: f = e 'q' + • Relevant bindings include + f :: t (bound at ../../typecheck/should_run/Defer01.hs:31:1) (deferred type error) *** Exception: ../../typecheck/should_run/Defer01.hs:34:8: error: - Couldn't match expected type ‘Char’ with actual type ‘a’ - ‘a’ is a rigid type variable bound by + • Couldn't match expected type ‘Char’ with actual type ‘a’ + ‘a’ is a rigid type variable bound by the type signature for: - h :: a -> (Char, Char) + h :: forall a. a -> (Char, Char) at ../../typecheck/should_run/Defer01.hs:33:6 - In the expression: x - In the expression: (x, 'c') - Relevant bindings include - x :: a (bound at ../../typecheck/should_run/Defer01.hs:34:3) - h :: a -> (Char, Char) - (bound at ../../typecheck/should_run/Defer01.hs:34:1) + • In the expression: x + In the expression: (x, 'c') + • Relevant bindings include + x :: a (bound at ../../typecheck/should_run/Defer01.hs:34:3) + h :: a -> (Char, Char) + (bound at ../../typecheck/should_run/Defer01.hs:34:1) (deferred type error) *** Exception: ../../typecheck/should_run/Defer01.hs:39:17: error: - Couldn't match expected type ‘Bool’ with actual type ‘T a’ - In the first argument of ‘not’, namely ‘(K a)’ - In the expression: (not (K a)) - Relevant bindings include - a :: a (bound at ../../typecheck/should_run/Defer01.hs:39:3) - i :: a -> () (bound at ../../typecheck/should_run/Defer01.hs:39:1) + • Couldn't match expected type ‘Bool’ with actual type ‘T a’ + • In the first argument of ‘not’, namely ‘(K a)’ + In the expression: (not (K a)) + • Relevant bindings include + a :: a (bound at ../../typecheck/should_run/Defer01.hs:39:3) + i :: a -> () (bound at ../../typecheck/should_run/Defer01.hs:39:1) (deferred type error) *** Exception: ../../typecheck/should_run/Defer01.hs:43:5: error: - No instance for (MyClass a1) arising from a use of ‘myOp’ - In the expression: myOp 23 - In an equation for ‘j’: j = myOp 23 + • No instance for (MyClass a1) arising from a use of ‘myOp’ + • In the expression: myOp 23 + In an equation for ‘j’: j = myOp 23 (deferred type error) <interactive>:13:8: error: - Couldn't match expected type ‘Bool’ with actual type ‘Int’ - In the first argument of ‘print’, namely ‘(k 2)’ - In the expression: print (k 2) - In an equation for ‘it’: it = print (k 2) + • Couldn't match expected type ‘Bool’ with actual type ‘Int’ + • In the first argument of ‘print’, namely ‘(k 2)’ + In the expression: print (k 2) + In an equation for ‘it’: it = print (k 2) *** Exception: ../../typecheck/should_run/Defer01.hs:49:5: error: - Couldn't match expected type ‘IO a0’ - with actual type ‘Char -> IO ()’ - Probable cause: ‘putChar’ is applied to too few arguments - In the first argument of ‘(>>)’, namely ‘putChar’ - In the expression: putChar >> putChar 'p' + • Couldn't match expected type ‘IO a0’ + with actual type ‘Char -> IO ()’ + • Probable cause: ‘putChar’ is applied to too few arguments + In the first argument of ‘(>>)’, namely ‘putChar’ + In the expression: putChar >> putChar 'p' (deferred type error) |