X(RS      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQR(c) Colin Woodbury, 2015 - 2017BSD3"Colin Woodbury <colingw@gmail.com>None2A wrapper for a parser function. Can be composed via their Monoid instance, such that a different parser can be tried if a previous one fails.A synonym for the more verbose  megaparsec error type.mDevelopers use a number of symbols to seperate groups of digits/letters in their version numbers. These are:&A colon (:). Often denotes an "epoch". A hyphen (-).EA plus (+). Stop using this outside of metadata if you are. Example:  10.2+0.93+1-1.An underscore (_). Stop using this if you are. A (Complex) Mess. This is a  descriptiveQ parser, based on examples of stupidly crafted version numbers used in the wild.[Groups of letters/numbers, separated by a period, can be further separated by the symbols _-+:Unfortunately, VChunk=s cannot be used here, as some developers have numbers like 1.003.04 which make parsers quite sad..Not guaranteed to have well-defined ordering (Ord9) behaviour, but so far internal tests show consistency. .A (General) Version. Not quite as ideal as a Y, but has some internal consistancy from version to version. Generally conforms to the x.x.x-x% pattern, and may optionally have an epoch1. These are prefixes marked by a colon, like in 1:2.3.4. Examples of Version that are not SemVer&: 0.25-2, 8.u51-1, 20150826-1, 1:2.3.4QA logical unit of a version number. Can consist of multiple letters and numbers.aA single unit of a Version. May be digits or a string of characters. Groups of these are called ?s, and are the identifiers separated by periods in the source.KAn (Ideal) version number that conforms to Semantic Versioning. This is a  prescriptive0 parser, meaning it follows the SemVer standard.<Legal semvers are of the form: MAJOR.MINOR.PATCH-PREREL+METAExample: 1.2.3-r1+commithash Extra Rules: Pre-release versions have lower! precedence than normal versions.2Build metadata does not affect version precedence.For more information, see http://semver.orgA top-level Versioning type. Acts as a wrapper for the more specific types. This allows each subtype to have its own parser, and for said parsers to be composed. This is useful for specifying custom behaviour for when a certain parser fails.S Convert a  to a  .T Convert a   to a  .!,Traverse some Text for its inner versioning. )_Versioning :: Traversal' Text Versioning >("1.2.3" & _Versioning . _Ideal . svPatch %~ (+ 1)) == "1.2.4""(Traverse some Text for its inner SemVer. !_SemVer :: Traversal' Text SemVer#)Traverse some Text for its inner Version. #_Version :: Traversal' Text Version$ &_Ideal :: Traversal' Versioning SemVer% )_General :: Traversal' Versioning Version& &_Complex :: Traversal' Versioning Mess' svMajor :: Lens' SemVer Int( svMinor :: Lens' SemVer Int) svPatch :: Lens' SemVer Int* svPreRel :: Lens' SemVer Int+ svMeta :: Lens' SemVer Int, _Digits :: Traversal' VUnit Int- _Str :: Traversal' VUnit TextUSet a   's epoch to V.. #vEpoch :: Lens' Version (Maybe Int)/ !vChunks :: Lens' Version [VChunk]0 vRel :: Lens' Version [VChunk]1Parse a piece of TextJ into either an (Ideal) SemVer, a (General) Version, or a (Complex) Mess.2 A wrapped , parser. Can be composed with other parsers.3!Parse a (Ideal) Semantic Version.4Internal megaparsec parser of 2.WDParse a group of digits, which can't be lead by a 0, unless it is 0.X Handling 0Q is a bit tricky. We can't allow runs of zeros in a chunk, since a version like 1.000.1 would parse as 1.0.1.5 A wrapped  , parser. Can be composed with other parsers.6Parse a (General)  , as defined above.7Internal megaparsec parser of 5.8 A wrapped  , parser. Can be composed with other parsers.9Parse a (Complex)  , as defined above.:Internal megaparsec parser of 8.;AConvert any parsed Versioning type to its textual representation.< Convert a $ back to its textual representation.= Convert a  $ back to its textual representation.> Convert a  $ back to its textual representation.Y Analogous to Z and [k. If a given Foldable is empty, a default value is returned. Else, a function is applied to that Foldable.\Flip an Ordering.A Customized.C2Build metadata does not affect version precedence.D>Two SemVers are equal if all fields except metadata are equal.EComparison of Ideals is always well defined.If comparison of General's is well-defined, then comparison of Ideal and General: is well-defined, as there exists a perfect mapping from Ideal to General.If comparison of Complex'es is well-defined, then comparison of General and ComplexB is well defined for the same reason. This implies comparison of Ideal and Complex is also well-defined.\  ST!"#$%&'()*+,-U./01234W]^_`abXcd567e89:fghij;<=>kY\l?@ABCDE?  !"#$%&'()*+,-./0123456789:;<=>?    369125847:;<=>!"#$%&'()*+./0,-E   ST!"#$%&'()*+,-U./01234W]^_`abXcd567e89:fghij;<=>kY\l?@ABCDEm      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\W]^W_`abcdefghijklmnopqr$versions-3.1.0-mKJ8j46BzN8Z3XoR3SuEw Data.Versions'megaparsec-5.3.0-1GRViXXMiqV4iQonskELphText.Megaparsec.ErrorparseErrorPrettyVParserrunVP ParsingErrorVSepVColonVHyphenVPlusVUnderMessVLeafVNodeVersion_vEpoch_vChunks_vRelVChunkVUnitDigitsStrSemVer_svMajor_svMinor_svPatch _svPreRel_svMeta VersioningIdealGeneralComplex _Versioning_SemVer_Version_Ideal_General_ComplexsvMajorsvMinorsvPatchsvPreRelsvMeta_Digits_StrvEpochvChunksvRelparseVsemverPsemversemver'versionPversionversion'messPmessmess'prettyV prettySemVer prettyVer prettyMess$fMonoidVParser $fOrdMess $fOrdVersion$fMonoidSemVer $fOrdSemVer $fEqSemVer$fOrdVersioning $fEqVUnit $fShowVUnit $fReadVUnit $fOrdVUnit $fShowSemVer $fEqVersion $fShowVersion$fEqVSep $fShowVSep$fEqMess $fShowMess$fEqVersioning$fShowVersioningvFromSmFromVwipebaseGHC.BaseNothingdigitschunkfoldable Data.Maybemaybe Data.EithereitheroppositemajorminorpatchpreRelmetaDatachunksiunitsunitepochleafnodetchunkssepsepCh chunksAsTshowt