title: How to enable Safe Haskell for a module in a backwards compatible way
body: <p>Suppose you have a module that you know is safe.</p>
  
  <p>You want to mark it as Safe Haskell with something like <code>{-# LANGUAGE Safe #-}</code> in the module itself or with something like <code>Extensions: Safe</code> in the cabal file.  Unfortunately, doing either of these breaks backwards compatibility (i.e. the module will not build on GHC &lt; 7.2).</p>
  
  <p>If the entire library is Safe, you can just wrap the extensions directive in the cabal file like this:</p>
  
  <pre><code>if impl(ghc &gt;= 7.2)
    Extensions: Safe
  </code></pre>
  
  <p>But that only works for the entire library.</p>
  
  <p>How do you mark <strong>a single module</strong> as Safe Haskell in a backwards compatible way?</p>