 <p>Presumably you want it to behave with the same fixity as <code>&gt;&gt;=</code>, so if you load up GHCi and type</p> <pre><code>&gt; :info (&gt;&gt;=) ... infixl 1 &gt;&gt;= </code></pre> <p>You could then define your operator as</p> <pre><code>infixl 1 |&gt;= (|&gt;=) :: Monad m =&gt; a -&gt; (a -&gt; m b) -&gt; m b a |&gt;= b = return a &gt;&gt;= b </code></pre> <p>But, if your monad preserves the monad laws, this is identical to just doing <code>b a</code>, so there isn't really a need for the operator in the first place.</p> <p>I'd also suggest using do notation:</p> <pre><code>naming path = do modTime &lt;- getModificationTime path let str = formatTime defaultTimeLocale "%Y%m%d" modTime name = printf "%s_%s" (takeBaseName path) str replaceBaseName path name </code></pre>