1

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

1 Answer 1

1

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:

enter image description here

1
  • For me already worked type definition with this error and after I added this switch to ghc options it helped me with other files which include this file to have also type definitions on mouse hover. I used this solution in the other lectures, not in week01.
    – zarej
    Nov 10, 2021 at 6:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.