Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Simon Peyton Jones
committed
Apr 29, 2013
1 parent
aee9b17
commit 8139121
Showing
3 changed files
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
module T7856 where | ||
|
||
tmp :: String -> IO () | ||
tmp = sequence_ lst | ||
where lst = [putStrLn "hi"] | ||
|
||
-- sequence_ :: Monad m => [m a] -> m () | ||
|
||
{- m () ~ (->) String (IO ()) | ||
m a ~ IO () | ||
Depends which one gets treated first. | ||
m := IO | ||
is better than | ||
m := (->) String | ||
It's a bit random which is chosen. | ||
I'll put it in regression suite so we see if it wobbles around. | ||
-} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
T7856.hs:4:7: | ||
Couldn't match expected type ‛String -> IO ()’ | ||
with actual type ‛IO ()’ | ||
Possible cause: ‛sequence_’ is applied to too many arguments | ||
In the expression: sequence_ lst | ||
In an equation for ‛tmp’: | ||
tmp | ||
= sequence_ lst | ||
where | ||
lst = [putStrLn "hi"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters