purescript-spec/purescript-spec-quickcheck

Compile error with 0.11.6?

Closed this issue · 3 comments

I've used the example code from the README to create a test file:

module Test.Main where

import Prelude
import Control.Monad.Eff (Eff)
import Test.QuickCheck ((===), (/==))
import Test.Spec (describe, it)
import Test.Spec.QuickCheck (QCRunnerEffects, quickCheck)
import Test.Spec.Reporter.Console (consoleReporter)
import Test.Spec.Runner (run)

main :: Eff (QCRunnerEffects ()) Unit
main = run [consoleReporter] do
  describe "Math" do
    it "works" $
      quickCheck \n -> (n * 2 / 2) === n
    it "works again" $
      quickCheck \n -> ((n + 1) * 2) /== n

But building and running the code with pulp gives this error:

Compiling Test.Main
Error found:
in module Test.Main
at test/qcs-spec.purs line 7, column 30 - line 7, column 45

  Cannot import type QCRunnerEffects from module Test.Spec.QuickCheck
  It either does not exist or the module does not export it.
  ...

I can see that module source does export QCRunnerEffects so I'm not sure if this is a problem in my (complete-newb) Purescript setup or something that has changed in the language since the last release of this module.

Thank you for reporting! I couldn't reproduce this particular compile error, but when I tried to run the test in purescript-spec-quickcheck (which is the same as in the README), I got a lot of compile errors from old dependencies incompatible with the current compiler.

I have bumped the dependencies for purescript-spec-quickcheck and released a new version 1.0.0. Would you try upgrading to that and see if your problem persists?

Okay -- that has fixed the problem, many thanks.

Great, thank you!