Plutus can't compile the EnglishAuction Haskell contract from GitHub repo.

https://github.com/input-output-hk/plutus-pioneer-program/blob/main/code/week01/src/Week01/EnglishAuction.hs

This EnglishAuction.hs spits out serveral errors when trying to compile it in the PluTus Playground.
I don’t get there to find the soloution to compile it without any errors - any suggestions ?
Se screenshots.

On line 154, the opening square bracket [ should be one space to the left, so it is exactly under the capital O of the previous line and in the same column as the underbar _ of line 161. In general, each pattern of a Haskell case statement must start in the same column as the others.

Yes it helped to adjust the code to the exact coloumns. Thanks a lot.
But now i ran into this error - this time i can’t find it should be a mis-alignment of Haskell pattern code columns ?

This is very likely the result of a mismatch between the Plutus version of the playground and the Plutus version of the English auction. The Plutus API changed quite a bit this year before being finalized in Alonzo: one of the changes involved Data and BuiltinData.

The best way to avoid this problem is to run the Plutus Playground locally on your machine from a repository that uses the same Plutus version as the example code. It looks like the Pioneers example uses a Plutus version from about 3 months ago, so you might need to run that vintage of the playground. (The cabal.project file implicitly contains the exact version information.) I think this issue is discussed in Lecture 1.

If I remember correctly, to get it to compile on the web playground I had to change the import names prepending Language. But as @bwbush pointed out it’s meant to be done on your local system.

1 Like

Hi !
Thanks for the reply!
I tried in a local machine with the Plutus Palyground and change to the import declaration (line 1) as seen from the screenshot.
The compiler then spits out the following error…

It should be {-# LANGUAGE DataKinds #-} because DataKinds is a language extension, not a module.