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

[ library, mit, text ] [ Propose Tags ]

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.

Modules

[Index]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

Versions [RSS] 0.1.0.0, 0.1.0.1
Dependencies base (>=4.5 && <4.9), parsec [details]
License MIT
Copyright 2015 Stack Builders Inc.
Author Justin Leitgeb
Maintainer justin@stackbuilders.com
Category Text
Home page https://github.com/stackbuilders/parseerror-eq
Bug tracker https://github.com/stackbuilders/parseerror-eq/issues
Source repo head: git clone git@github.com:stackbuilders/parseerror-eq.git
Uploaded by sestrella at 2015-04-23T18:14:13Z
Distributions
Reverse Dependencies 1 direct, 0 indirect [details]
Downloads 1541 total (5 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2015-04-23 [all 1 reports]