0

I am getting this error when I try to compile the homework for Week03 of the plutus pioneer program:

You need to import `printSchemas` in order to compile successfully, you can do this 
with either
     `import Playground.Contract`
or
     `import Playground.Contract (printSchemas)`

But the import already exist as per the homework draft is. Any way to debug this?

2
  • I'm having the same issue for Week04.Homework.hs. Did you find a resolution to this? Commented Feb 10, 2022 at 20:52
  • @Kyle Yes. The solution is once you've copied the script in playground, you have to make sure that the lines that have the imports occupy only one line. Because of Haskell beautifying the code, you'll notice that the line which imports printSchema occupies 2 lines. Just adjust that import in Playground to occupy only one line by bringing the second line up with the first. This really just concerns the Playground.
    – d_fajardo
    Commented Feb 12, 2022 at 7:02

1 Answer 1

2

I ran into this error as well for the previous homework when copy/pasting output from cat on terminal. I never quite figured out why but for some reason when copy/pasting multiline import statements formatted by stylish-haskell break the interpreter. A quick fix is to move it back up to the previous line.

2
  • I don't really know what you mean by 'moving it back up' as it starts on the first line
    – d_fajardo
    Commented Jan 31, 2022 at 20:17
  • Yes I see what you mean now. the importr statement in the Playground must be in one line. It works now.
    – d_fajardo
    Commented Feb 1, 2022 at 8:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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