title: How to define function only for old versions in GHC?
body: <p>I have a code that uses the <code>fromRight</code> function defined circa GHC 8.2. But I need to downgrade to GHC 8.0.2, which gives an error about <code>Variable not in scope:</code> for <code>fromRight</code></p>
  
  <p>I was wondering if it possible and how to add the missing definition</p>
  
  <pre><code>fromRight :: b -&gt; Either a b -&gt; b
  fromRight _ (Right b) = b
  fromRight b _         = b
  </code></pre>
  
  <p>so that it is only used when I use an GHC version than 8.2.1?</p>