title: Can I name a function signature?
body: <p>I'm passing around a partially applied function. The full signature is:</p>
  
  <pre><code>import Data.Map as Map 
  -- Update the correct bin of the histogram based on the min value, bin width,
  -- the histogram stored as a map, and the actual value we are interested in.
  updateHist :: Double -&gt; Double -&gt; Map.Map Bin Double -&gt; Double -&gt; 
                Map.Map Bin Double
  </code></pre>
  
  <p>The function updates a Map which stores data for a histogram. The first two parameters give the bottom bounds of data we are interested, the next is the bin width for the histogram. I fill these values in when the program starts up and pass the partially applied function all over the module. This means I have a ton of functions with a signature like:</p>
  
  <pre><code>-- Extra the data out of the string and update the histogram (in the Map) with it.
  doSomething :: String -&gt; (Map.Map Bin Double -&gt; Double -&gt; Map.Map Bin Double) -&gt; 
                 Map.Map Bin Double
  </code></pre>
  
  <p>This is all fine and dandy, but writing "(Map.Map Bin Double -> Double -> Map.Map Bin Double)" is rather verbose. I'd like to replace them all with "UpdateHistFunc" as a type but for some reason I keep failing. </p>
  
  <p>I tried:</p>
  
  <pre><code>newtype UpdateHistFunc = Map.Map Bin Double -&gt; Double -&gt; Map.Map Bin Double
  </code></pre>
  
  <p>This failed with the error:</p>
  
  <blockquote>
    <p>HistogramForColumn.hs:84:44: parse error on input `->'</p>
  </blockquote>
  
  <p>What am I doing wrong?</p>