cabal-version: 2.2 name: optics-regexp version: 0.1.0.0 bug-reports: https://github.com/lawrencebell/optics-regexp/issues license: BSD-3-Clause license-file: LICENSE author: Lawrence Bell copyright: 2020 lawrencebell maintainer: Lawrence Bell build-type: Simple category: Lenses, Optics, Regex synopsis: A lensy/optical interface to regular expressions description: This package, in combination with the @@ package, allows you to do regular-expression style string manipulations in a lensy manner. We provide support for the common string types @String@ and @Text@, as well as for the common binary type @ByteString@ (which works by assuming utf-8 encoded @ByteString@s). . It is probably easiest to explain with some quick examples. . * To search for all occurrences of a pattern, we can write @"foo :: a ~ b => Bar a b" ^.. [regex|\\w+|] % match@ which will yield @["foo", "a", "b", \"Bar\", "a", "b"]@ * To upper-case the first group in every match of a pattern, we can do @"a: yes, b: no" & [regex|(\\w+): (\\w+)|] % group 0 %~ toUpper@ (the indexing of the groups here starts at 0) which returns @"A: yes, B: no"@. . This library is inspired by and based on the @@ library, which does the same thing but for @@ rather than for @@. extra-source-files: data/lorem-ipsum.txt extra-doc-files: CHANGELOG.md , README.md source-repository head type: git location: https://github.com/lawrencebell/optics-regexp common common-options build-depends: base ^>=4.12.0.0 default-language: Haskell2010 ghc-options: -Wall library import: common-options reexported-modules: Optics.Regex.String , Optics.Regex.Text.Lazy , Optics.Regex.Text.Strict , Optics.Regex.ByteString.Lazy , Optics.Regex.ByteString.Strict build-depends: optics-regexp-internal-lib-string , optics-regexp-internal-lib-text , optics-regexp-internal-lib-bytestring test-suite spec import: common-options type: exitcode-stdio-1.0 hs-source-dirs: aux-main main-is: Test.hs build-depends: optics-regexp-internal-aux-string , optics-regexp-internal-aux-text , optics-regexp-internal-aux-bytestring , hspec benchmark bench import: common-options type: exitcode-stdio-1.0 hs-source-dirs: aux-main other-modules: Paths_optics_regexp autogen-modules: Paths_optics_regexp main-is: Mark.hs build-depends: optics-regexp-internal-aux-bytestring , optics-regexp-internal-aux-string , optics-regexp-internal-aux-text , bytestring , gauge , text -- internal libraries for the main functionality library optics-regexp-internal-lib-string import: common-options reexported-modules: Optics.Regex.String mixins: optics-regexp-internal-lib-skeleton (Optics.Regex as Optics.Regex.String) requires (StrBldr as StrBldr.String) build-depends: optics-regexp-internal-lib-skeleton , optics-regexp-internal-lib-skeleton-string library optics-regexp-internal-lib-text import: common-options reexported-modules: Optics.Regex.Text.Lazy , Optics.Regex.Text.Strict mixins: optics-regexp-internal-lib-skeleton (Optics.Regex as Optics.Regex.Text.Lazy) requires (StrBldr as StrBldr.Text.Lazy) , optics-regexp-internal-lib-skeleton (Optics.Regex as Optics.Regex.Text.Strict) requires (StrBldr as StrBldr.Text.Strict) build-depends: optics-regexp-internal-lib-skeleton , optics-regexp-internal-lib-skeleton-text library optics-regexp-internal-lib-bytestring import: common-options reexported-modules: Optics.Regex.ByteString.Lazy , Optics.Regex.ByteString.Strict mixins: optics-regexp-internal-lib-skeleton (Optics.Regex as Optics.Regex.ByteString.Lazy) requires (StrBldr as StrBldr.ByteString.Lazy) , optics-regexp-internal-lib-skeleton (Optics.Regex as Optics.Regex.ByteString.Strict) requires (StrBldr as StrBldr.ByteString.Strict) build-depends: optics-regexp-internal-lib-skeleton , optics-regexp-internal-lib-skeleton-bytestring library optics-regexp-internal-lib-skeleton-string import: common-options hs-source-dirs: lib-instances exposed-modules: StrBldr.String build-depends: pcre-heavy library optics-regexp-internal-lib-skeleton-text import: common-options hs-source-dirs: lib-instances exposed-modules: StrBldr.Text.Lazy , StrBldr.Text.Strict build-depends: pcre-heavy , text library optics-regexp-internal-lib-skeleton-bytestring import: common-options hs-source-dirs: lib-instances exposed-modules: StrBldr.ByteString.Lazy , StrBldr.ByteString.Strict build-depends: bytestring , pcre-heavy library optics-regexp-internal-lib-skeleton import: common-options hs-source-dirs: lib-skeleton exposed-modules: Optics.Regex signatures: StrBldr build-depends: optics-core , pcre-heavy , template-haskell -- internal libraries for testing & benchmarking library optics-regexp-internal-aux-string import: common-options reexported-modules: Bench.String , Spec.String mixins: optics-regexp-internal-aux-skeleton (Bench as Bench.String) requires (Deriv.StrMat as Deriv.StrMat.String) , optics-regexp-internal-aux-skeleton (Spec as Spec.String) requires (Deriv.StrMat as Deriv.StrMat.String) build-depends: optics-regexp-internal-aux-skeleton , optics-regexp-internal-aux-skeleton-string library optics-regexp-internal-aux-text import: common-options reexported-modules: Bench.Text.Lazy , Bench.Text.Strict , Spec.Text.Lazy , Spec.Text.Strict mixins: optics-regexp-internal-aux-skeleton (Bench as Bench.Text.Lazy) requires (Deriv.StrMat as Deriv.StrMat.Text.Lazy) , optics-regexp-internal-aux-skeleton (Bench as Bench.Text.Strict) requires (Deriv.StrMat as Deriv.StrMat.Text.Strict) , optics-regexp-internal-aux-skeleton (Spec as Spec.Text.Lazy) requires (Deriv.StrMat as Deriv.StrMat.Text.Lazy) , optics-regexp-internal-aux-skeleton (Spec as Spec.Text.Strict) requires (Deriv.StrMat as Deriv.StrMat.Text.Strict) build-depends: optics-regexp-internal-aux-skeleton , optics-regexp-internal-aux-skeleton-text library optics-regexp-internal-aux-bytestring import: common-options reexported-modules: Bench.ByteString.Lazy , Bench.ByteString.Strict , Spec.ByteString.Lazy , Spec.ByteString.Strict mixins: optics-regexp-internal-aux-skeleton (Bench as Bench.ByteString.Lazy) requires (Deriv.StrMat as Deriv.StrMat.ByteString.Lazy) , optics-regexp-internal-aux-skeleton (Bench as Bench.ByteString.Strict) requires (Deriv.StrMat as Deriv.StrMat.ByteString.Strict) , optics-regexp-internal-aux-skeleton (Spec as Spec.ByteString.Lazy) requires (Deriv.StrMat as Deriv.StrMat.ByteString.Lazy) , optics-regexp-internal-aux-skeleton (Spec as Spec.ByteString.Strict) requires (Deriv.StrMat as Deriv.StrMat.ByteString.Strict) build-depends: optics-regexp-internal-aux-skeleton , optics-regexp-internal-aux-skeleton-bytestring library optics-regexp-internal-aux-skeleton-string import: common-options hs-source-dirs: aux-instances exposed-modules: Deriv.StrMat.String build-depends: optics-regexp-internal-lib-string , optics-core , pcre-heavy library optics-regexp-internal-aux-skeleton-text import: common-options hs-source-dirs: aux-instances exposed-modules: Deriv.StrMat.Text.Lazy , Deriv.StrMat.Text.Strict build-depends: optics-regexp-internal-lib-text , optics-core , pcre-heavy , text library optics-regexp-internal-aux-skeleton-bytestring import: common-options hs-source-dirs: aux-instances exposed-modules: Deriv.StrMat.ByteString.Lazy , Deriv.StrMat.ByteString.Strict build-depends: bytestring , optics-regexp-internal-lib-bytestring , optics-core , pcre-heavy library optics-regexp-internal-aux-skeleton import: common-options hs-source-dirs: aux-skeleton exposed-modules: Bench , Spec signatures: Deriv.StrMat build-depends: deepseq , gauge , hspec , optics-core , pcre-heavy