cuedo / rot13 Goto Github PK
View Code? Open in Web Editor NEWHaskell implementation of the rot13 substitution cipher.
Home Page: https://hackage.haskell.org/package/rot13
License: MIT License
Haskell implementation of the rot13 substitution cipher.
Home Page: https://hackage.haskell.org/package/rot13
License: MIT License
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.