<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>

CC BY-SA 4.0
2021-08-05T15:35:41.593Z
I never thought of adding `plutus-use-cases` thats helpful!
Hud
CC BY-SA 4.0
2021-07-24T17:18:40.173Z
2021-07-24T19:57:29.963Z
2021-07-24T19:57:29.963Z
sorki
<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>

<plutus><smart-contract><cabal>
illegal symbol `forall` in type, RankNTypes
# illegal symbol `forall` in type, RankNTypes

(Asked by: username_0 on 2021-07-23)

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 . 

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 #-}?

**Tags:** plutus, smart-contract, cabal

---

## 1 answers

### Answer by username_1 on 2021-07-24. Score: 1 | Accepted answer

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.

> **Comments:**
> **username_0**: I never thought of adding `plutus-use-cases` thats helpful!  

---

