Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rot13-0.2.0.0 test suite build failure #1

Closed
DanBurton opened this issue Jul 10, 2017 · 4 comments
Closed

rot13-0.2.0.0 test suite build failure #1

DanBurton opened this issue Jul 10, 2017 · 4 comments

Comments

@DanBurton
Copy link

DanBurton commented Jul 10, 2017

As seen on stackage server:

Preprocessing test suite 'spec' for rot13-0.2.0.0...
[1 of 1] Compiling Main             ( test/Spec.hs, dist/build/spec/spec-tmp/Main.o )

test/Spec.hs:20:7: error:
    • Ambiguous type variable ‘c0’ arising from a use of ‘property’
      prevents the constraint ‘(Arbitrary c0)’ from being solved.
      Probable fix: use a type annotation to specify what ‘c0’ should be.
      These potential instances exist:
        instance [safe] (Arbitrary a, Arbitrary b) =>
                        Arbitrary (Either a b)
          -- Defined in ‘Test.QuickCheck.Arbitrary’
        instance [safe] Arbitrary Ordering
          -- Defined in ‘Test.QuickCheck.Arbitrary’
        instance [safe] Arbitrary Integer
          -- Defined in ‘Test.QuickCheck.Arbitrary’
        ...plus 19 others
        ...plus 32 instances involving out-of-scope types
        (use -fprint-potential-instances to see them all)
    • In the second argument of ‘($)’, namely
        ‘property $ \ s -> s == (rot13 . rot13) s’
      In a stmt of a 'do' block:
        it "is reversible" $ property $ \ s -> s == (rot13 . rot13) s
      In the second argument of ‘($)’, namely
        ‘do { it "correctly ciphers the alphabet"
              $ do { rot13 "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
                     `shouldBe`
                       "NOPQRSTUVWXYZABCDEFGHIJKLMnopqrstuvwxyzabcdefghijklm" };
              it "is reversible" $ property $ \ s -> s == (rot13 . rot13) s }’


test/Spec.hs:20:24: error:
    • Ambiguous type variable ‘c0’ arising from a use of ‘==’
      prevents the constraint ‘(Eq c0)’ from being solved.
      Relevant bindings include s :: c0 (bound at test/Spec.hs:20:19)
      Probable fix: use a type annotation to specify what ‘c0’ should be.
      These potential instances exist:
        instance (Eq b, Eq a) => Eq (Either a b)
          -- Defined in ‘Data.Either’
        instance Eq Ordering -- Defined in ‘ghc-prim-0.5.0.0:GHC.Classes’
        instance Eq Integer
          -- Defined in ‘integer-gmp-1.0.0.1:GHC.Integer.Type’
        ...plus 23 others
        ...plus 162 instances involving out-of-scope types
        (use -fprint-potential-instances to see them all)
    • In the expression: s == (rot13 . rot13) s
      In the second argument of ‘($)’, namely
        ‘\ s -> s == (rot13 . rot13) s’
      In the second argument of ‘($)’, namely
        ‘property $ \ s -> s == (rot13 . rot13) s’

test/Spec.hs:20:30: error:
    • Ambiguous type variable ‘c0’ arising from a use of ‘rot13’
      prevents the constraint ‘(Rot13 c0)’ from being solved.
      Relevant bindings include s :: c0 (bound at test/Spec.hs:20:19)
      Probable fix: use a type annotation to specify what ‘c0’ should be.
      These potential instances exist:
        instance Rot13 Integer -- Defined in ‘Codec.Rot13’
        instance Rot13 Char -- Defined in ‘Codec.Rot13’
        instance Rot13 Int -- Defined in ‘Codec.Rot13’
        ...plus two others
        ...plus 22 instances involving out-of-scope types
        (use -fprint-potential-instances to see them all)
    • In the first argument of ‘(.)’, namely ‘rot13’
      In the expression: rot13 . rot13
      In the second argument of ‘(==)’, namely ‘(rot13 . rot13) s’

I was able to reproduce on my local machine like so:

$ stack unpack rot13-0.2.0.0 && cd rot13-0.2.0.0
$ stack init --resolver nightly-2017-07-10
$ stack test
DanBurton added a commit to commercialhaskell/stackage that referenced this issue Jul 11, 2017
@DanBurton
Copy link
Author

I've constrained rot13 on Stackage to < 0.2.0.0 for now. Kindly fix the test suite and we'll remove the constraint. Alternatively, to lift the constraint immediately, you can ask us to add this package to the "expected-test-failures" list.

@kvanbere
Copy link
Member

Thanks for reporting , I'll look into it asap

@kvanbere
Copy link
Member

kvanbere commented Jul 11, 2017

@DanBurton I have pushed a fix and blacklisted 0.2.0.0 on Hackage.

Please use 0.2.0.1. Sorry for the inconvenience.

$ stack test
...
Codec.Rot13
  correctly ciphers the alphabet (rot13 String)
  correctly ciphers the alphabet (rot13 ByteString)
  correctly ciphers the alphabet (rot13 Text)
  is reversible (String)
  is reversible (ByteString)
  is reversible (Text)

Finished in 0.0185 seconds
6 examples, 0 failures
             
Completed 2 action(s).

@DanBurton
Copy link
Author

Great, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants