title: Eliminating repetition in cabal files
body: <p>I often have similar properties in many stanzas of my <code>.cabal</code> files. E.g.</p>
  
  <pre><code>Library x
      ...
      ghc-options:
         -O2 -Wall -fno-warn-missing-signatures -fwarn-incomplete-patterns
         -fno-warn-name-shadowing
  
  Executable y
      ...
      ghc-options:
         -O2 -Wall -fno-warn-missing-signatures -fwarn-incomplete-patterns
         -fno-warn-name-shadowing
  </code></pre>
  
  <p>Keeping them consistent is tedious and error-prone. Is there a better way?</p>
  
  <p>Even trickier is when the fields are similar but not exactly the same e.g. when I have several executables which have common build dependencies but small variations.</p>