The command above relies on the fact that there is a QuickCheck library built and cached in the local .stack/snapshots directory.
When it's not the case (you build a fresh LTS snapshot), the command will result in an error:
$ stack ghc -- Generate.hs -o generate
[1 of 1] Compiling Main ( Generate.hs, Generate.o ) [Test.QuickCheck changed]
Generate.hs:8:1: error:
Could not find module ‘Test.QuickCheck’
Use -v to see a list of the files searched for.
|
8 | import Test.QuickCheck
| ^^^^^^^^^^^^^^^^^^^^^^
Issue
The command above relies on the fact that there is a QuickCheck library built and cached in the local .stack/snapshots directory.
When it's not the case (you build a fresh LTS snapshot), the command will result in an error:
Using the
solves the problem, and also looks cleaner IMO.