user1005: I am trying to build Future.hs from plutus-use-case from scratch. I take two files from plutus-starter: cabal.project as is, and plutus-starter.cabal that I have to edit according to the imports in Future.hs. I get however these errors when I run cabal build:
src/Plutus/Contracts/Future.hs:574:8: error:
    Illegal symbol `forall' in type
    Perhaps you intended to use RankNTypes or a similar language
    extension to enable explicit-forall syntax: forall <tvs>. <type>

I also had to add several other modules e.g. Plutus.Contracts.Currency and for every .hs file with forall, do I have to add {-# LANGUAGE RankNTypes #-}?

user810: Yes, the LANGUAGE pragmas are required, best practice is probably following Plutus code examples and having separate pragmas per-file as needed.
It is also possible to allow some extensions globally via .cabal file by using default-extensions, e.g.:
library
 default-extensions:
   DataKinds
   RankNTypes

but this should be done with care and can bite later as some extensions are not compatible.
Also instead of adding files locally, try adding plutus-use-cases to the list of your dependencies, then you can import Plutus.Contracts.Currency.

1005: <p>I am trying to build <a href="https://github.com/input-output-hk/plutus/blob/master/plutus-use-cases/src/Plutus/Contracts/Future.hs" rel="nofollow noreferrer">Future.hs</a> from plutus-use-case from scratch. I take two files from <a href="https://github.com/input-output-hk/plutus-starter" rel="nofollow noreferrer">plutus-starter</a>: <code>cabal.project</code> as is, and <code>plutus-starter.cabal</code> that I have to edit according to the imports in Future.hs. I get however these errors when I run <code>cabal build</code>:</p>
<pre><code>src/Plutus/Contracts/Future.hs:574:8: error:
    Illegal symbol `forall' in type
    Perhaps you intended to use RankNTypes or a similar language
    extension to enable explicit-forall syntax: forall &lt;tvs&gt;. &lt;type&gt;
</code></pre>
<p>I also had to add several other modules e.g. Plutus.Contracts.Currency and for every .hs file with <code>forall</code>, do I have to add <code>{-# LANGUAGE RankNTypes #-}</code>?</p>
 810: <p>Yes, the <code>LANGUAGE</code> pragmas are required, best practice is probably following Plutus code examples and having separate pragmas per-file as needed.</p>
<p>It is also possible to allow some extensions globally via <code>.cabal</code> file by using <code>default-extensions</code>, e.g.:</p>
<pre><code>library
 default-extensions:
   DataKinds
   RankNTypes
</code></pre>
<p>but this should be done with care and can bite later as some extensions are not compatible.</p>
<p>Also instead of adding files locally, try adding <code>plutus-use-cases</code> to the list of your dependencies, then you can <code>import Plutus.Contracts.Currency</code>.</p>
