title: Case split on a maybe type on PureScript
body: <p>I am learning PureScript by following <a href="https://book.purescript.org/chapter3.html#functions-and-records" rel="nofollow noreferrer">PureScript by example</a>, and by chapter 3 (rest of definitions there) there is an exercise to delete duplicate entries from a bog, but I cannot get to work the case split for the Maybe (Nothing/Just e). I checked also <a href="https://github.com/purescript/documentation/blob/master/language/Syntax.md" rel="nofollow noreferrer">the syntax guide</a> but I cannot catch the pitfall and keep getting <code>Unknown data constructor Nothing</code>.</p>
  <pre><code>import Prelude    
  import Data.AddressBook
  import Control.Plus (empty)
  import Data.List (List(..), (:), filter, head, foldl, tail)
  import Data.Maybe (Maybe, isJust)
  import Data.Newtype (overF)
  
  skipIfDup :: AddressBook -&gt; AddressBook -&gt; AddressBook
  skipIfDup newBook (Nil : book) = newBook
  skipIfDup newBook (entry : book) =
      skipIfDup newerBook book
      where
          newerBook :: AddressBook
          newerBook = 
              case findEntry entry.firstName entry.lastName newerBook of
                  Nothing -&gt; newBook
                  Just e -&gt; insertEntry e newBook
  </code></pre>