I copied the plutus-starter template: https://github.com/input-output-hk/plutus-starter and created a file BasicPlutusTx.hs (and added it under exposed-modules in the .cabal file).

Then I started copying over all the code from the introductory tutorial: https://plutus.readthedocs.io/en/latest/plutus/tutorials/plutus-tx.html which includes doctests. What do I need to add to the .cabal file to run these doctests?

  • Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer.
    – Community Bot
    Commented Jan 22, 2022 at 11:54

1 Answer 1


To run doctest, you don't need to add that to your cabal file. You need to install the doctest executable, and then run cabal repl --with-ghc=doctest. See the doctest documentation.

  • IIUC, I can only use things that are installed with Nix in this project. How do I find and install the doctest package for Nix?
    – dspyz
    Commented Jan 19, 2022 at 3:18

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.