title: Function with type synonym
body: <p>Sorry for asking as potentially silly question, but returning to Haskell to do some conversion from one database package to a different one, I find myself a bit puzzled about how to do this properly.</p>
  
  <p>In the <code>Database.SQLite3</code> module, there is an <code>execWithCallback</code> with type</p>
  
  <pre><code>execWithCallback :: Database -&gt; Text -&gt; ExecCallback -&gt; IO ()
  </code></pre>
  
  <p>Now, the callback is defined as </p>
  
  <pre><code>type ExecCallback = ColumnCount -&gt; [Text]-&gt; [Maybe Text] -&gt; IO ()
  </code></pre>
  
  <p>that is, a function with type <code>ExecCallback</code>
  My silly test code compiles and runs correctly:</p>
  
  <pre><code>{-# LANGUAGE OverloadedStrings #-}
  
  import Database.SQLite3
  import Data.Text
  
  cb :: ColumnCount -&gt; [Text] -&gt; [Maybe Text] -&gt; IO ()
  cb  n cnl ct = do print $ cnl !! 1
                    return ()
  
  main = do
    dh &lt;- open "fileinfo.sqlite"
    execWithCallback dh "select * from files;" cb
    close dh
  </code></pre>
  
  <p>but then, what is the point of the type??? And, how do I specify that <code>cb</code> is an <code>ExecCallback</code>??</p>