user6004: 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.

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

user6124: 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)

6004: <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.stack.imgur.com/CiGgO.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/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>
 382: <p>You need to remove the module export lines. That's not valid Plutus code but is useful for testing in a repl.</p>
 6124: <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>
