cabal-version: 3.0 name: check-cfg-ambiguity version: 0.1.0.0 synopsis: Checks context free grammar for ambiguity using brute force up to given limit description: Checks context free grammar for ambiguity using brute force up to given limit. It is impossible to check arbitrary context free grammar for ambiguity on a Turing machine. So we provide you brute force algorithm up to a limit. You can also use function "upTo" from package "Earley-0.13.0.1" for the same purpose, but it can freeze on infinitely ambiguous grammars: https://github.com/ollef/Earley/issues/54 . So I decided to write and publish this package. See also: https://mail.haskell.org/pipermail/haskell-cafe/2021-May/134006.html You don't need to be registered on SourceHut to create bug report. If you think that this software is not needed or existing software already subsumes its functionality, please, tell me that, I will not be offended. license: BSD-3-Clause license-file: LICENSE maintainer: Askar Safin category: Parsing build-type: Simple extra-source-files: README.md ChangeLog source-repository head type: git location: https://git.sr.ht/~safinaskar/check-cfg-ambiguity library exposed-modules: CheckCFGAmbiguity -- base 4.13 removed Monad.fail, so "before base 4.13 there was nothing" build-depends: -- CI-BOUNDS-BEGIN base >= 4.13.0.0 && <= 4.17.0.0, containers >= 0.6.2.1 && <= 0.6.6 -- CI-BOUNDS-END default-language: Haskell2010 ghc-options: -Wall -Wincomplete-patterns -Wincomplete-uni-patterns -Wmissing-export-lists -Wredundant-constraints -Wcompat -Wincomplete-record-updates -Wpartial-fields -Wunused-type-patterns -Wimplicit-lift -- When following links below, keep in mind that "doctest" and "docspec" are two different words. Also keep in mind that "cabal-doctest" is not the only way to integrate cabal and doctest -- I use simple way of cabal/doctest integration, described in https://github.com/sol/doctest/blob/d5b10128403663f7dc581477c7c7eb28a6f26f5a/README.markdown in section "Cabal integration" -- Alternative way is to use "cabal-doctest" ( https://hackage.haskell.org/package/cabal-doctest-1.0.8 ), i. e. to write custom Setup.hs. But this requires boilerplate. Also, this can cause problems: https://github.com/ekmett/distributive/pull/53 , https://github.com/ekmett/distributive/issues/37 -- Another alternative way is not to integrate doctest and cabal at all and simply run "doctest" or "cabal-doctest" from continuous integration directly. But this will require us to specify all dependencies for tests in CI scripts. This is ugly -- Note that author of cabal-doctest doesn't use this program anymore: https://github.com/ekmett/distributive/pull/53#issuecomment-744024619 -- So, we choose that way from doctest's README -- To make it work "cabal v2-build" should write environment files. See https://stackoverflow.com/a/58027909 and https://github.com/ekmett/comonad/pull/58/commits/264f9057ea37cbffeb83744ff667ead4aa0f456a#diff-73f8a010e9b95aa9fe944c316576b12c2ec961272d428e38721112ecb1c1a98bR205 (note: this link shows how to run cabal-docspec, not cabal-doctest) -- On docspec: the author doesn't think docspec is "useful for others": https://github.com/ekmett/distributive/pull/60#discussion_r549900441 test-suite doctests type: exitcode-stdio-1.0 ghc-options: -threaded main-is: doctests.hs build-depends: base, doctest == 0.20.1, QuickCheck == 2.14.2 default-language: Haskell2010