Difference between revisions of "Restrict type of monadic binding"

From HaskellWiki
Jump to navigation Jump to search
(part of "do notation considered harmful" which can be seen as a proposal)
 
m
Line 1: Line 1:
According to [[Do_notation_considered_harmful#Safety]]
+
According to [[Do notation considered harmful#Safety]]
 
the type of the monadic binding combinator (>>) should be restricted to
 
the type of the monadic binding combinator (>>) should be restricted to
 
<haskell>
 
<haskell>

Revision as of 07:24, 5 November 2007

According to Do notation considered harmful#Safety the type of the monadic binding combinator (>>) should be restricted to

(>>) :: m () -> m a -> m a

This way, you can omit _ <- only if the monadic return value has type ().