 <p><code>ViewPatterns</code> is probably the way to go here. Your code doesn't work because you need to call <code>viewl</code> or <code>viewr</code> on your <code>Seq</code> first to get something of type <code>ViewL</code> or <code>ViewR</code>. <code>ViewPatterns</code> can handle that pretty nicely:</p> <pre><code>{-# LANGUAGE ViewPatterns #-} foo (S.viewl -&gt; S.EmptyL) = ... -- empty on left foo (S.viewl -&gt; (x S.:&lt; xs)) = ... -- not empty on left </code></pre> <p>Which is equivalent to something like:</p> <pre><code>foo seq = case S.viewl seq of S.EmptyL -&gt; ... (x S.:&lt; xs) -&gt; ... </code></pre>