<p>Hi man Lars answered this in the 7th Q&amp;A video of the Plutus pioneers program cohort 3.</p>
<p>If you don't want to watch the video the long and short of it is that the <code>PlutusTx.TH.compile</code> module is just an Exported version of the  <code>PlutusTx.compile</code> module. This is done to make it easier for people to use, but the <code>PlutusTx.compile</code> is really all you need and you should learn it just in case at some point the <code>PlutusTx.compile</code> module has some functionality that has yet to be exported to the <code>PlutusTx.TH.compile</code> module.</p>

CC BY-SA 4.0
2022-03-01T20:27:11.770Z
2022-03-01T20:27:11.770Z
KryptoKing
<p>I've been reading the official Plutus docs and saw that in the explanation about Template Haskell, there is information about <code>PlutusTx.TH.compile</code>, to use it for producing the quoted Plutus Core program.</p>
<p>And in Plutus-Pioneers examples there is <code>PlutusTx.compile</code> being used, instead of the 'TH' version.</p>
<p>Can this two imported functions be used interchangeably? Their type looks the same in ghci, so I'm a bit confused.</p>
<p>Thanks in advance!</p>

<plutus><plutus-pioneer-program><plutustx>
Difference between `PlutusTx.TH.compile` and `PlutusTx.compile`?
# Difference between `PlutusTx.TH.compile` and `PlutusTx.compile`?

(Asked by: username_0 on 2022-02-26)

I've been reading the official Plutus docs and saw that in the explanation about Template Haskell, there is information about `PlutusTx.TH.compile`, to use it for producing the quoted Plutus Core program.

And in Plutus-Pioneers examples there is `PlutusTx.compile` being used, instead of the 'TH' version.

Can this two imported functions be used interchangeably? Their type looks the same in ghci, so I'm a bit confused.

Thanks in advance!

**Tags:** plutus, plutus-pioneer-program, plutustx

---

## 1 answers

### Answer by username_1 on 2022-03-01. Score: 1

Hi man Lars answered this in the 7th Q&A video of the Plutus pioneers program cohort 3.

If you don't want to watch the video the long and short of it is that the `PlutusTx.TH.compile` module is just an Exported version of the `PlutusTx.compile` module. This is done to make it easier for people to use, but the `PlutusTx.compile` is really all you need and you should learn it just in case at some point the `PlutusTx.compile` module has some functionality that has yet to be exported to the `PlutusTx.TH.compile` module.


---

