user2236: I'm trying to get type definitions for Plutus code in VSCode and I'm getting an unusual error. The first extension in the file is {-# LANGUAGE DataKinds #-} (<- this is a clickable link)
and the error I'm getting 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 PlutusTx.Eq.$fEqMaybe
            [DFunId(nt)]
            No unfolding
Context: Compiling expr: PlutusTx.Eq.$fEqMaybe
Context: Compiling expr: PlutusTx.Eq.$fEqMaybe @ Week01.EnglishAuction.Bid
Context: Compiling expr: PlutusTx.Eq.$fEqMaybe
                           @ Week01.EnglishAuction.Bid
                           ($c==
// truncated because of Stackoverflow limits

I've set the language server in VSCode to /nix/store/7bjn84ssy2kdzy7k0izqb3id3bvg6pzb-haskell-language-server-exe-haskell-language-server-1.1.0.0/bin/haskell-language-server and interesting when I run cabal build in my shell I don't get a similar error:
 1:22PM /Users/paymahn/plutus-pioneer-program/code/week01 (nix)  ✘ 130 main ◼
 ❮❮❮ cabal build
Build profile: -w ghc-8.10.4.20210212 -O1
In order, the following will be built (use -v for more details):
 - plutus-pioneer-program-week01-0.1.0.0 (lib) (first run)
Configuring library for plutus-pioneer-program-week01-0.1.0.0..
Preprocessing library for plutus-pioneer-program-week01-0.1.0.0..
Building library for plutus-pioneer-program-week01-0.1.0.0..
[1 of 1] Compiling Week01.EnglishAuction ( src/Week01/EnglishAuction.hs, /Users/paymahn/plutus-pioneer-program/code/week01/dist-newstyle/build/x86_64-osx/ghc-8.10.4.20210212/plutus-pioneer-program-week01-0.1.0.0/build/Week01/EnglishAuction.o, /Users/paymahn/plutus-pioneer-program/code/week01/dist-newstyle/build/x86_64-osx/ghc-8.10.4.20210212/plutus-pioneer-program-week01-0.1.0.0/build/Week01/EnglishAuction.dyn_o )


user2236: Here's a diff which shows how to get this fixed in VScode: https://github.com/paymog/plutus-pioneer-program/commit/7a1c2ff206aeaca9496075f18e2989901aeda9fe
Note that even with this, VSCode fails to navigate to type definitions:


2236: <p>I'm trying to get type definitions for Plutus code in VSCode and I'm getting an unusual error. The first extension in the file is <a href="https://github.com/paymog/plutus-pioneer-program/blob/9c83322743e393427acdc24525b04dfc1c49084d/code/week01/src/Week01/EnglishAuction.hs#L1" rel="nofollow noreferrer"><code>{-# LANGUAGE DataKinds #-}</code></a> (&lt;- this is a clickable link)</p>
<p>and the error I'm getting 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 PlutusTx.Eq.$fEqMaybe
            [DFunId(nt)]
            No unfolding
Context: Compiling expr: PlutusTx.Eq.$fEqMaybe
Context: Compiling expr: PlutusTx.Eq.$fEqMaybe @ Week01.EnglishAuction.Bid
Context: Compiling expr: PlutusTx.Eq.$fEqMaybe
                           @ Week01.EnglishAuction.Bid
                           ($c==
// truncated because of Stackoverflow limits
</code></pre>
<p>I've set the language server in VSCode to <code>/nix/store/7bjn84ssy2kdzy7k0izqb3id3bvg6pzb-haskell-language-server-exe-haskell-language-server-1.1.0.0/bin/haskell-language-server</code> and interesting when I run <code>cabal build</code> in my shell I don't get a similar error:</p>
<pre><code> 1:22PM /Users/paymahn/plutus-pioneer-program/code/week01 (nix)  ✘ 130 main ◼
 ❮❮❮ cabal build
Build profile: -w ghc-8.10.4.20210212 -O1
In order, the following will be built (use -v for more details):
 - plutus-pioneer-program-week01-0.1.0.0 (lib) (first run)
Configuring library for plutus-pioneer-program-week01-0.1.0.0..
Preprocessing library for plutus-pioneer-program-week01-0.1.0.0..
Building library for plutus-pioneer-program-week01-0.1.0.0..
[1 of 1] Compiling Week01.EnglishAuction ( src/Week01/EnglishAuction.hs, /Users/paymahn/plutus-pioneer-program/code/week01/dist-newstyle/build/x86_64-osx/ghc-8.10.4.20210212/plutus-pioneer-program-week01-0.1.0.0/build/Week01/EnglishAuction.o, /Users/paymahn/plutus-pioneer-program/code/week01/dist-newstyle/build/x86_64-osx/ghc-8.10.4.20210212/plutus-pioneer-program-week01-0.1.0.0/build/Week01/EnglishAuction.dyn_o )
</code></pre>
 2236: <p>Here's a diff which shows how to get this fixed in VScode: <a href="https://github.com/paymog/plutus-pioneer-program/commit/7a1c2ff206aeaca9496075f18e2989901aeda9fe" rel="nofollow noreferrer">https://github.com/paymog/plutus-pioneer-program/commit/7a1c2ff206aeaca9496075f18e2989901aeda9fe</a></p>
<p>Note that even with this, VSCode fails to navigate to type definitions:</p>
<p><a href="https://i.stack.imgur.com/GoTEd.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/GoTEd.jpg" alt="enter image description here" /></a></p>
