title: How do you concisely create a Date in Purescript, when you know statically that the year + month + date are valid
body: <p><code>Data.Date.canonicalDate</code> constructs a <code>Date</code> value, but you need a <code>Year</code>, <code>Month</code> and <code>Day</code> value as arguments:</p>
  
  <ul>
  <li>Since <code>Month</code> is known statically, you can just hard-code it: e.g. <code>June</code></li>
  <li><code>Year</code> and <code>Day</code> can't be hard-coded, though, even though you know them statically. You have to call <code>toEnum</code>, and that only gives you a <code>Maybe Year</code> / <code>Maybe Day</code>.</li>
  </ul>
  
  <p>My current solution is this, which seems like a crazy hack:</p>
  
  <pre><code>hackyMakeDate :: Int -&gt; Month -&gt; Int -&gt; Date
  hackyMakeDate year month day = fromMaybe (canonicalDate bottom bottom bottom) maybeDate
    where
      maybeDate = do
        year' &lt;- toEnum year
        day' &lt;- toEnum day
        pure $ canonicalDate year' month day'
  </code></pre>
  
  <p>Is there a simpler way?</p>