<p>Copy paste the whole file and just delete the line with</p>
<pre><code>module Week02.Homework1 where
</code></pre>
<p>The playground does not need a module declaration (i guess it declares its own)</p>

CC BY-SA 4.0
2022-01-21T15:21:27.433Z
2022-01-21T15:21:27.433Z
rkstgr
<p>You need to remove the module export lines. That's not valid Plutus code but is useful for testing in a repl.</p>

CC BY-SA 4.0
2022-01-21T14:28:58.683Z
2022-01-21T14:28:58.683Z
Samuel Leathers
<p>I am trying to compile the Homework01.hs
The build locally on Linux passes when I do :l src/Week02/Homework1.hs</p>
<pre><code>Prelude PlutusTx Ledger.Scripts&gt; :l src/Week02/Homework1.hs
[1 of 1] Compiling Week02.Homework1 ( src/Week02/Homework1.hs, /home/xxx/plutus-pioneer-program/code/week02/dist-newstyle/build/x86_64-linux/ghc-8.10.4.20210212/plutus-pioneer-program-week02-0.1.0.0/build/Week02/Homework1.o )
Ok, one module loaded.
Prelude PlutusTx Ledger.Scripts Week02.Homework1&gt;
</code></pre>
<p>But when pasting the code in playground, I see an error :
<a href="https://i.sstatic.net/CiGgO.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/CiGgO.png" alt="enter image description here" /></a></p>
<p>Is this a playground problem or am I doing something wrong in Haskell ?</p>
<p>Just fyi, it does compile successfully in playground with the skeleton code initially provided by Lars at github.</p>
<p>The error description in playground doesn't help.</p>

<plutus-pioneer-program><plutus-playground><build>
build okay locally, but fails in playground
# build okay locally, but fails in playground

(Asked by: username_0 on 2022-01-21)

I am trying to compile the Homework01.hs
The build locally on Linux passes when I do :l src/Week02/Homework1.hs
Prelude PlutusTx Ledger.Scripts> :l src/Week02/Homework1.hs
[1 of 1] Compiling Week02.Homework1 ( src/Week02/Homework1.hs, /home/xxx/plutus-pioneer-program/code/week02/dist-newstyle/build/x86_64-linux/ghc-8.10.4.20210212/plutus-pioneer-program-week02-0.1.0.0/build/Week02/Homework1.o )
Ok, one module loaded.
Prelude PlutusTx Ledger.Scripts Week02.Homework1>

But when pasting the code in playground, I see an error :

Is this a playground problem or am I doing something wrong in Haskell ?
Just fyi, it does compile successfully in playground with the skeleton code initially provided by Lars at github.
The error description in playground doesn't help.

**Tags:** plutus-pioneer-program, plutus-playground, build

---

## 2 answers

### Answer by username_1 on 2022-01-21. Score: 2 | Accepted answer

Copy paste the whole file and just delete the line with
module Week02.Homework1 where

The playground does not need a module declaration (i guess it declares its own)


---

### Answer by username_2 on 2022-01-21. Score: 2

You need to remove the module export lines. That's not valid Plutus code but is useful for testing in a repl.


---

