How can I return a Maybe value from do notation in PureScript?
<p>I'm trying to return a Maybe value from a function that uses do notation, but I can't seem to get it to work.  This function takes a string (The "filename") and a Path to search in...</p>

<pre><code>findIn :: String -&gt; Path -&gt; Maybe Path
findIn search start = do
    file &lt;- ls start
    if ((filename file) == search)
      then Just file
      else Nothing
</code></pre>

<p>Where...</p>

<pre><code>ls :: Path -&gt; Array Path
filename :: Path -&gt; String
</code></pre>

<p>But I keep getting the error "Count not match Type Array with type Maybe", so it looks like the compiler is expecting the do notation to return an array.  How would I return a maybe value?</p>