parseerror-eq: Adds and Eq instance for Parsec's ParseError if needed

This is a package candidate release! Here you can preview how this package release will appear once published to the main package index (which can be accomplished via the 'maintain' link below). Please note that once a package has been published to the main package index it cannot be undone! Please consult the package uploading documentation for more information.


A library to help with compatibility against Parsec versions. Adds an instance of Eq to the ParseError data type, if it's missing from the version of Parsec that you're compiling against.

To test Parsec's parsing, it's very useful to have an Eq instance for ParseError. This is included in Parsec versions >= 3.1.9, but you need to define it yourself in previous versions.

This simple library conditionally adds an Eq instance for ParseError only if the Parsec version being used is < 3.1.9. To use it, just add parseerror-eq to your cabal dependencies, and in the module where you want to compare ParseErrors,

import Text.ParseErrorEq ()

The ParseError Eq instance will be imported if it is necessary, otherwise the ParseErrorEq module is empty, so nothing will happen. This ensures that your code that needs the ParseError Eq instance will work regardless of the Parsec version that it is compiled against.


Change logNone available
Dependenciesbase (>=4.5 && <4.9), parsec [details]
Copyright2015 Stack Builders Inc.
AuthorJustin Leitgeb
Home page
Bug tracker
Source repositoryhead: git clone
UploadedThu Apr 23 18:12:59 UTC 2015 by sestrella




Maintainers' corner

For package maintainers and hackage trustees