GithubHelp home page GithubHelp logo

cuedo / rot13 Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 18 KB

Haskell implementation of the rot13 substitution cipher.

Home Page: https://hackage.haskell.org/package/rot13

License: MIT License

Haskell 100.00%
haskell rot13 codec

rot13's Introduction

License

MIT License

Copyright (c) 2017-2020 Cuedo Business Solutions (https://cuedo.com.au)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Free open source software, sponsored by cuedo.com.au.

Cuedo Business Solutions

rot13's People

Contributors

kvanbere avatar

Stargazers

 avatar

Watchers

 avatar  avatar

rot13's Issues

rot13-0.2.0.0 test suite build failure

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.