Commit 9107d827 authored by Simon Peyton Jones's avatar Simon Peyton Jones
Browse files

Follow error message changes

parent ca32a1e4
......@@ -6,8 +6,8 @@ T2111.hs:6:23:
The arrow command
undefined -< x
was found where an expression was expected
In a stmt of a 'do' expression: x <- undefined -< x
In a stmt of a 'do' expression: rec {x <- undefined -< x}
In a stmt of a 'do' block: x <- undefined -< x
In a stmt of a 'do' block: rec {x <- undefined -< x}
In the expression:
do { rec {x <- undefined -< x};
undefined -< x }
......@@ -16,8 +16,7 @@ employees = [ ("Simon", "MS", 80)
main = putStrLn (show output)
where
output = [ (dept, salary)
| then sortWith by 1
, (name, dept, salary) <- employees
| (name, dept, salary) <- employees
, then sortWith by salary
, then filter by salary > 50
, then take 1 ]
\ No newline at end of file
......@@ -16,8 +16,7 @@ employees = [ ("Simon", "MS", 80)
main = putStrLn (show output)
where
output = [ (dept, salary)
| then sortWith by 1
, (name, dept, salary) <- employees
| (name, dept, salary) <- employees
, then sortWith by salary
, then filter by salary > 50
, then take 1 ]
......@@ -15,7 +15,8 @@ main = do let ghcExtensions = [ ext | (ext, _, _) <- xFlags ]
= ["ParallelArrays",
"RelaxedLayout",
"AlternativeLayoutRule",
"AlternativeLayoutRuleTransitional"]
"AlternativeLayoutRuleTransitional",
"MonadComprehensions"]
unexpectedGhcOnlyExtension = ghcOnlyExtensions
\\ expectedGhcOnlyExtensions
mapM_ putStrLn unexpectedGhcOnlyExtension
......
{-# LANGUAGE MonadComprehensions ParallelListComp #-}
{-# LANGUAGE MonadComprehensions, ParallelListComp #-}
module Foo where
......
NondecreasingIndentationFail.hs:7:28: Empty 'do' construct
NondecreasingIndentationFail.hs:7:28: Empty 'do' block
NondecreasingIndentationFail.hs:9:28: Empty 'do' block
T3811g.hs:6:8:
The last statement in a 'do' construct must be an expression:
_ <- return ()
The last statement in a 'do' block must be an expression
_ <- return ()
readFail028.hs:4:11:
The last statement in a 'do' construct must be an expression:
x <- return ()
The last statement in a 'do' block must be an expression
x <- return ()
readFail038.hs:6:7:
Illegal parallel list comprehension: use -XParallelListComp or -XMonadComprehensions
Unexpected parallel statement in a list comprehension
Use -XParallelListComp
readFail042.hs:10:9:
Illegal transform or grouping list comprehension: use -XTransformListComp or -XMonadComprehensions
Unexpected transform statement in a list comprehension
Use -XTransformListComp
readFail042.hs:11:9:
Illegal transform or grouping list comprehension: use -XTransformListComp or -XMonadComprehensions
Unexpected transform statement in a list comprehension
Use -XTransformListComp
readFail042.hs:11:23: Not in scope: `by'
......
readFail043.hs:10:9:
Illegal transform or grouping list comprehension: use -XTransformListComp or -XMonadComprehensions
Unexpected transform statement in a list comprehension
Use -XTransformListComp
readFail043.hs:10:20: Not in scope: `by'
readFail043.hs:10:23: Not in scope: `x'
readFail043.hs:11:9:
Illegal transform or grouping list comprehension: use -XTransformListComp or -XMonadComprehensions
Unexpected transform statement in a list comprehension
Use -XTransformListComp
readFail043.hs:11:20: Not in scope: `by'
......@@ -16,6 +18,7 @@ readFail043.hs:11:23: Not in scope: `x'
readFail043.hs:11:25: Not in scope: `using'
readFail043.hs:12:9:
Illegal transform or grouping list comprehension: use -XTransformListComp or -XMonadComprehensions
Unexpected transform statement in a list comprehension
Use -XTransformListComp
readFail043.hs:12:20: Not in scope: `using'
......@@ -4,7 +4,7 @@ rebindable6.hs:106:17:
arising from a do statement
Possible fix:
add an instance declaration for (HasSeq (IO a -> t0 -> IO b))
In a stmt of a 'do' expression: f
In a stmt of a 'do' block: f
In the expression:
do { f;
Just (b :: b) <- g;
......@@ -20,7 +20,7 @@ rebindable6.hs:107:17:
arising from a do statement
Possible fix:
add an instance declaration for (HasFail ([Prelude.Char] -> t1))
In a stmt of a 'do' expression: Just (b :: b) <- g
In a stmt of a 'do' block: Just (b :: b) <- g
In the expression:
do { f;
Just (b :: b) <- g;
......@@ -37,7 +37,7 @@ rebindable6.hs:107:17:
Possible fix:
add an instance declaration for
(HasBind (IO (Maybe b) -> (Maybe b -> t1) -> t0))
In a stmt of a 'do' expression: Just (b :: b) <- g
In a stmt of a 'do' block: Just (b :: b) <- g
In the expression:
do { f;
Just (b :: b) <- g;
......@@ -52,9 +52,13 @@ rebindable6.hs:108:17:
No instance for (HasReturn (b -> t1))
arising from a use of `return'
Possible fix: add an instance declaration for (HasReturn (b -> t1))
In the expression: return b
In a stmt of a 'do' expression: Just (b :: b) <- g
In a stmt of a 'do' block: return b
In the expression:
do { f;
Just (b :: b) <- g;
return b }
In an equation for `test_do':
test_do f g
= do { f;
Just (b :: b) <- g;
return b }
......@@ -3,7 +3,7 @@ simpl017.hs:44:12:
Couldn't match expected type `forall v. [E m i] -> E' v m a'
with actual type `[E m i] -> E' v0 m a'
In the first argument of `return', namely `f'
In the expression: return f
In a stmt of a 'do' block: return f
In the first argument of `E', namely
`(do { let ix :: [E m i] -> m i
ix [i] = runE i
......@@ -17,4 +17,4 @@ simpl017.hs:63:5:
The function `a' is applied to one argument,
but its type `forall v. [E m0 Int] -> E' v m0 Int' has none
In the first argument of `plus', namely `a [one]'
In the expression: a [one] `plus` a [one]
In a stmt of a 'do' block: a [one] `plus` a [one]
......@@ -7,7 +7,7 @@ T3613.hs:14:20:
T3613.hs:17:24:
Couldn't match expected type `Maybe a0' with actual type `IO ()'
In a stmt of a 'do' expression: bar
In a stmt of a 'do' block: bar
In the first argument of `fooThen', namely
`(do { bar;
undefined })'
......
......@@ -2,7 +2,7 @@
mc19.hs:10:31:
Couldn't match type `a' with `[a]'
`a' is a rigid type variable bound by
a type expected by the context: [a] -> [a] at mc19.hs:10:10
a type expected by the context: [a] -> [a] at mc19.hs:10:26
Expected type: [a] -> [a]
Actual type: [a] -> [[a]]
In the expression: inits
......
......@@ -3,10 +3,11 @@
{-# OPTIONS_GHC -XMonadComprehensions -XTransformListComp #-}
module ShouldFail where
import GHC.Exts( the )
data Unorderable = Gnorf | Pinky | Brain
foo = [ ()
foo = [ length x
| x <- [Gnorf, Brain]
, then group using take 5
]
mc21.hs:11:26:
mc21.hs:12:26:
Couldn't match type `a' with `[a]'
`a' is a rigid type variable bound by
a type expected by the context: [a] -> [[a]] at mc21.hs:11:9
a type expected by the context: [a] -> [[a]] at mc21.hs:12:9
Expected type: [a] -> [[a]]
Actual type: [a] -> [a]
In the return type of a call of `take'
......
mc22.hs:8:13:
No instance for (Num [[Char]])
arising from the literal `1'
Possible fix: add an instance declaration for (Num [[Char]])
In the second argument of `(+)', namely `1'
In the expression: x + 1
In the expression:
[x + 1 | x <- ["Hello", "World"], then group using take 5]
mc22.hs:10:26:
Couldn't match type `a' with `[a]'
Couldn't match type `a' with `t0 a'
`a' is a rigid type variable bound by
a type expected by the context: [a] -> [[a]] at mc22.hs:10:9
Expected type: [a] -> [[a]]
a type expected by the context: [a] -> [t0 a] at mc22.hs:10:9
Expected type: [a] -> [t0 a]
Actual type: [a] -> [a]
In the return type of a call of `take'
In the expression: take 5
mc23.hs:9:29:
Couldn't match expected type `a -> t0' with actual type `[a0]'
Expected type: (a -> t0) -> [a] -> [a]
Expected type: (a -> t0) -> [a] -> t1 a
Actual type: [a0] -> [a0]
In the return type of a call of `take'
Probable cause: `take' is applied to too many arguments
In the expression: take 5
-- Checks that the correct type is used checking the using clause of the group when a by clause is present
-- Checks that the correct type is used checking the using clause of
-- the group when a by clause is present
{-# OPTIONS_GHC -XMonadComprehensions -XTransformListComp #-}
module ShouldFail where
foo = [ ()
foo = [ length x
| x <- [1..10]
, then group by x using take 2
]
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment