<p>The way HLS is enabled without plugin errors is discussed here:</p>
<ul>
<li><a href="https://github.com/input-output-hk/plutus-starter/pull/23" rel="nofollow noreferrer">https://github.com/input-output-hk/plutus-starter/pull/23</a></li>
<li><a href="https://github.com/input-output-hk/plutus-starter/pull/29" rel="nofollow noreferrer">https://github.com/input-output-hk/plutus-starter/pull/29</a></li>
<li><a href="https://github.com/input-output-hk/plutus/issues/3454" rel="nofollow noreferrer">https://github.com/input-output-hk/plutus/issues/3454</a></li>
</ul>
<p>Basically, you need to enable <code>defer-plugin-errors</code> flag.
You can do this with following command:</p>
<p><code>cabal configure -f defer-plugin-errors</code></p>
<p>Remember to turn it off when you actually need to check if validators are compiled properly. This resets configuration:</p>
<p><code>cabal configure</code></p>

CC BY-SA 4.0
2022-02-09T09:45:35.193Z
It works! Thank you
kindofdev
CC BY-SA 4.0
2022-01-17T06:28:02.710Z
2022-01-17T06:28:02.710Z
Stanislav Zhdanovich
<p>The pragma <code>{-# LANGUAGE NoImplicitPrelude #-}</code> and
<a href="https://github.com/input-output-hk/plutus/blob/0c3c310cab61dbff8cbc1998a3678b367be6815a/plutus-tx/src/PlutusTx/Prelude.hs" rel="nofollow noreferrer"><code>import PlutusTx.Prelude</code></a> might help.</p>
<p>It replaces the implicitly defined functions in Haskell by inlinable alternatives. <a href="https://github.com/input-output-hk/plutus/blob/0c3c310cab61dbff8cbc1998a3678b367be6815a/plutus-tx/src/PlutusTx/Bool.hs" rel="nofollow noreferrer">Here</a> is an example for Boolean operators.</p>

CC BY-SA 4.0
2021-05-18T09:21:39.677Z
That could have worked, but I tried and the error is still the same. The validator inside `module Plutus.Contracts.FungibleToken` did not use any functions from `Prelude`, so that's expectable.
Stanislav Zhdanovich
CC BY-SA 4.0
2021-05-15T07:45:58.573Z
2021-05-15T07:45:58.573Z
thebrandre
<p>Have you encountered this error? IDE complains that the validator is not INLINABLE, while it actually is:</p>
<pre><code>Program error: GHC Core to PLC plugin: E043:Error: Reference to a name which is not a local, a builtin, or an external INLINABLE function: Variable GHC.Base..
            No unfolding
Context: Compiling expr: GHC.Base..
Context: Compiling expr: GHC.Base..
                           @ (Plutus.V1.Ledger.Contexts.ScriptContext -&gt; GHC.Types.Bool)
Context: Compiling expr: GHC.Base..
                           @ (Plutus.V1.Ledger.Contexts.ScriptContext -&gt; GHC.Types.Bool)
                           @ Ledger.Typed.Scripts.Validators.WrappedMonetaryPolicyType
Context: Compiling expr: GHC.Base..
                           @ (Plutus.V1.Ledger.Contexts.ScriptContext -&gt; GHC.Types.Bool)
                           @ Ledger.Typed.Scripts.Validators.WrappedMonetaryPolicyType
                           @ Plutus.V1.Ledger.Value.TokenName
Context: Compiling expr: GHC.Base..
                           @ (Plutus.V1.Ledger.Contexts.ScriptContext -&gt; GHC.Types.Bool)
                           @ Ledger.Typed.Scripts.Validators.WrappedMonetaryPolicyType
                           @ Plutus.V1.Ledger.Value.TokenName
                           Ledger.Typed.Scripts.Validators.wrapMonetaryPolicy
Context: Compiling expr: GHC.Base..
                           @ (Plutus.V1.Ledger.Contexts.ScriptContext -&gt; GHC.Types.Bool)
                           @ Ledger.Typed.Scripts.Validators.WrappedMonetaryPolicyType
                           @ Plutus.V1.Ledger.Value.TokenName
                           Ledger.Typed.Scripts.Validators.wrapMonetaryPolicy
                           Plutus.Contracts.FungibleToken.validator
Context: Compiling expr at &quot;main:Plutus.Contracts.FungibleToken:(19,6)-(19,69)&quot;
</code></pre>
<p>Module I'm trying to use IDE in:</p>
<pre><code>{-# LANGUAGE DataKinds       #-}
{-# LANGUAGE TemplateHaskell #-}

module Plutus.Contracts.FungibleToken where

import           Ledger.Typed.Scripts      (MonetaryPolicy)
import qualified Ledger.Typed.Scripts      as Scripts
import           Plutus.V1.Ledger.Contexts (ScriptContext)
import qualified Plutus.V1.Ledger.Scripts  as Scripts
import           Plutus.V1.Ledger.Value    (TokenName, Value)
import qualified PlutusTx

{-# INLINABLE validator #-}
validator :: TokenName -&gt; ScriptContext -&gt; Bool
validator _ _ = True

makeLiquidityPolicy :: TokenName -&gt; MonetaryPolicy
makeLiquidityPolicy tokenName = Scripts.mkMonetaryPolicyScript $
  $$(PlutusTx.compile [|| Scripts.wrapMonetaryPolicy . validator ||])
    `PlutusTx.applyCode`
        PlutusTx.liftCode tokenName
</code></pre>

CC BY-SA 4.0
2021-07-27T02:34:06.017Z
Did you ever solve this problem?
Mitchell Turner
CC BY-SA 4.0
2022-01-06T07:30:22.823Z
Running into a similar problem with a very basic validator script. This GitHub issue seems to be related: https://github.com/input-output-hk/plutus/issues/3454
Jaanus Varus
<haskell><ide>
Haskell IDE INLINABLE error help
# Haskell IDE INLINABLE error help

(Asked by: username_0 on 2021-05-14)

Have you encountered this error? IDE complains that the validator is not INLINABLE, while it actually is:
Program error: GHC Core to PLC plugin: E043:Error: Reference to a name which is not a local, a builtin, or an external INLINABLE function: Variable GHC.Base..
            No unfolding
Context: Compiling expr: GHC.Base..
Context: Compiling expr: GHC.Base..
                           @ (Plutus.V1.Ledger.Contexts.ScriptContext -> GHC.Types.Bool)
Context: Compiling expr: GHC.Base..
                           @ (Plutus.V1.Ledger.Contexts.ScriptContext -> GHC.Types.Bool)
                           @ Ledger.Typed.Scripts.Validators.WrappedMonetaryPolicyType
Context: Compiling expr: GHC.Base..
                           @ (Plutus.V1.Ledger.Contexts.ScriptContext -> GHC.Types.Bool)
                           @ Ledger.Typed.Scripts.Validators.WrappedMonetaryPolicyType
                           @ Plutus.V1.Ledger.Value.TokenName
Context: Compiling expr: GHC.Base..
                           @ (Plutus.V1.Ledger.Contexts.ScriptContext -> GHC.Types.Bool)
                           @ Ledger.Typed.Scripts.Validators.WrappedMonetaryPolicyType
                           @ Plutus.V1.Ledger.Value.TokenName
                           Ledger.Typed.Scripts.Validators.wrapMonetaryPolicy
Context: Compiling expr: GHC.Base..
                           @ (Plutus.V1.Ledger.Contexts.ScriptContext -> GHC.Types.Bool)
                           @ Ledger.Typed.Scripts.Validators.WrappedMonetaryPolicyType
                           @ Plutus.V1.Ledger.Value.TokenName
                           Ledger.Typed.Scripts.Validators.wrapMonetaryPolicy
                           Plutus.Contracts.FungibleToken.validator
Context: Compiling expr at "main:Plutus.Contracts.FungibleToken:(19,6)-(19,69)"

Module I'm trying to use IDE in:
{-# LANGUAGE DataKinds       #-}
{-# LANGUAGE TemplateHaskell #-}

module Plutus.Contracts.FungibleToken where

import           Ledger.Typed.Scripts      (MonetaryPolicy)
import qualified Ledger.Typed.Scripts      as Scripts
import           Plutus.V1.Ledger.Contexts (ScriptContext)
import qualified Plutus.V1.Ledger.Scripts  as Scripts
import           Plutus.V1.Ledger.Value    (TokenName, Value)
import qualified PlutusTx

{-# INLINABLE validator #-}
validator :: TokenName -> ScriptContext -> Bool
validator _ _ = True

makeLiquidityPolicy :: TokenName -> MonetaryPolicy
makeLiquidityPolicy tokenName = Scripts.mkMonetaryPolicyScript $
  $$(PlutusTx.compile [|| Scripts.wrapMonetaryPolicy . validator ||])
    `PlutusTx.applyCode`
        PlutusTx.liftCode tokenName

**Tags:** haskell, ide
> **Comments:**
> **username_1**: Did you ever solve this problem?  
> **username_2**: Running into a similar problem with a very basic validator script. This GitHub issue seems to be related: https://github.com/input-output-hk/plutus/issues/3454  

---

## 2 answers

### Answer by username_0 on 2022-01-17. Score: 3 | Accepted answer

The way HLS is enabled without plugin errors is discussed here:

* <https://github.com/input-output-hk/plutus-starter/pull/23>
* <https://github.com/input-output-hk/plutus-starter/pull/29>
* <https://github.com/input-output-hk/plutus/issues/3454>

Basically, you need to enable `defer-plugin-errors` flag.
You can do this with following command:

`cabal configure -f defer-plugin-errors`

Remember to turn it off when you actually need to check if validators are compiled properly. This resets configuration:

`cabal configure`

> **Comments:**
> **username_3**: It works! Thank you  

---

### Answer by username_4 on 2021-05-15. Score: 3

The pragma `{-# LANGUAGE NoImplicitPrelude #-}` and
[`import PlutusTx.Prelude`](https://github.com/input-output-hk/plutus/blob/0c3c310cab61dbff8cbc1998a3678b367be6815a/plutus-tx/src/PlutusTx/Prelude.hs) might help.

It replaces the implicitly defined functions in Haskell by inlinable alternatives. [Here](https://github.com/input-output-hk/plutus/blob/0c3c310cab61dbff8cbc1998a3678b367be6815a/plutus-tx/src/PlutusTx/Bool.hs) is an example for Boolean operators.

> **Comments:**
> **username_0**: That could have worked, but I tried and the error is still the same. The validator inside `module Plutus.Contracts.FungibleToken` did not use any functions from `Prelude`, so that's expectable.  

---

