A POSIX, extended regex-engine.

Latest on Hackage:

This package is not currently in any snapshots. If you're interested in using it, we recommend adding it to Stackage Nightly. Doing so will make builds more reliable, and allow to host generated Haddocks.

GPL licensed by Dr. Alistair Ward
Maintained by


Hackage Build Status

This is "RegExChar", a regex-engine built from the polymorphic regex-engine "RegExDot" as a proof of concept.


It can be built and installed using Cabal.


  • The directory "man/" contains the documentation.
  • More information about this application can be found at RegExChar.


For information on copying and distributing this package, see the file "LICENSE" in this directory.


Bug-reports should be emailed to .


The test-suite can be run using:

cabal configure --enable-tests;
cabal build;
cabal test --show-details=always;


This application is written and maintained by Dr. Alistair Ward.


2010-11-18 Dr. Alistair Ward

  • First version of the package.

  • Reacted to major-number changes in the packages "ToolShed-" & "RegExDot-".
  • Created src/RegExChar/ (& then modified module-names accordingly), & sub-directory "data/".
  • Pacified hlint.
  • Qualified identifiers used in error-messages.

  • Ported to ghc-7.0.1:
    • Replaced the deprecated module "Test.QuickCheck.Batch", & labelled properties.
  • Added the cabal-flag "threaded", to account for the requirement to link with the threaded runtime when using a threaded version of the library package "RegExDot".

  • Parallelised processing where executable "grecce" is requested to read multiple input-data files.
  • Extracted matching-operation from the module "Main", into new module "Grecce.Grep".
  • Migrated modules required only by the executable "grecce", from the directory "RegExChar" into the new directory "Grecce".
  • Replaced use of @threaded@-flag in source-code, with Cabal CPP-macro.
  • Added .spec-file.

  • Added default values of command-line flags, to usage-message.
  • Reacted to migration of RegExDot.Options to ToolShed.Options.
  • Used new module "ToolShed.Package".

  • Fixed negated reference to unparenthesised CPP-macro "MIN_VERSION".
  • Protected reference in module "Grecce/QC/QuickChecks", to Test.QuickCheck.verboseCheck, using CPP-statement.

  • Amended RPM .spec-file, to install under directory "/usr", rather than "/usr/local".
  • Renamed package from "RegExChar" to "regexchar", for compatibility with Debian's .deb-format.
  • Added directory-structure required to build .deb-package.

  • Redefined man-page to be an "extra-source-file" in the .cabal-file & the .spec-file.
  • Added manually controlled flag "llvm" to the .cabal-file.
  • Replaced references to the module "ToolShed.Package" with "Distribution.Package".
  • Changed identifier for type-parameters, to better reflect its role.
  • Removed dependency on archaic module "ToolShed.Arithmetic".
  • Reacted to the creation of module "ToolShed.Defaultable".
  • Uploaded to Hackage.

  • Amended the .cabal-file to more correctly specify dependency on package "toolshed".
  • Used new module "ToolShed.Pair" from package toolshed-
  • Relocated modules "Grecce.Assert", "Grecce.Performance" and "Grecce.QC", into new layer "Test", in module-hierarchy.
  • Guarded flag "eager-blackholing" in the cabal-file.

  • Recoded module "RegExChar.RegExOptsChar" to the interface Data.Array.IArray.IArray, rather than the data-type Data.Array.Array.
  • Replaced (+ 1) and (- 1) with the faster calls succ and pred, in modules "RegExChar.RegExOptsChar", "Grecce.Test.Performance.ExtendedRegExTestsPositive" and "Grecce.Grep".
  • Used Paths_regexchar.version in Main, rather than hard-coding it.
  • Reacted to new module-hierarchy and addition of method ToolShed.SelfValidate.getErrors, in package "toolshed-", and used it to improved error-reporting in @instance Read RegExChar.ExtendedRegExChar.ExtendedRegExChar@.
  • Replaced use of Control.Monad in RegExChar.MetaChar and RegExChar.ExtendedRegExChar, with Control.Applicative.
  • Replaced System with System.Environment and System.Exit.
  • Removed dependency on haskell98.

  • Fully qualified symbols imported from package "regexdot".
  • Used new constant RegExDot.Anchor.unanchored.
  • Added details to any failure to parse the command-line arguments.
  • Used new test-modules from package "toolshed-".

  • Refactored module "Grecce.Test.QC.QuickChecks".
  • Replaced calls to error from inside the IO-monad, with
  • Trapped command-line arguments to which garbage has been appended.
  • Added files to build .deb to the .cabal-file.
  • Tested with haskell-platform-2013.2.0.0.
  • Replaced preprocessor-directives with build-depends constraints in the .cabal-file.

  • Either replaced instances of (<$>) with fmap to avoid ambiguity between modules "Control.Applicative" & "Prelude" which (from package "base-4.8") also exports this symbol, or hid the symbol when importing the module "Prelude".

  • Added the compiler to the output returned for the command-line option "version".
  • Changed flag "threaded" in the .cabal-file to manual.
  • Added "Default-language"-specification to the .cabal-file.
  • Added file "README.markdown".
  • Converted this file to markdown-format.
  • Replaced System.Exit.exitWith System.Exit.ExitSuccess with System.Exit.exitSuccess.
  • Moved the entry-point to the test-suite from module "Main.hs" to "Test.hs", both to integrate with cabal & to minimise the dependencies of the executable.
  • Partitioned the source-files into directories "src-lib", "src-exe", & "src-test", & referenced them individually from the .cabal-file to avoid repeated compilation.
  • Used CPP to control the import of symbols from Control.Applicative.

  • Corrected the markdown-syntax in this file.
  • Reverted to calling "error" rather than "", since the String-argument for the latter is discarded in Monad-implementations other than IO.
  • Uploaded to GitHub.
  • Simplified file src-test/Main.hs.
  • Added prop_read to modules; Grecce.Test.QC.{RepeatableMetaChar,ExtendedRegExChar}.
  • Replaced calls to error with [], in implementation of Read, in module RegExChar.ExtendedRegExChar.
  • Added file .travis.yml to control testing by
  • Added file .ghci.
  • Replaced use of module ToolShed.Defaultable with Data.Default.
  • Reimplemented RegExChar.MetaChar.deconstruct, QuickCheck.ExtendedRegExChar.deconstruct, QuickCheck.RepeatableMetaChar.deconstruct using record-syntax.
  • Tested with ghc-8.0.1.

  • Added default RTS-options to regexchar.cabal.
  • Removed dependency on Distribution.Package.PackageName

comments powered byDisqus