úÎ& %1"(c) The University of Glasgow 2004?BSD-style (see the file libraries/base/LICENSE in the ghc repo)Chris Blake <chris@code.sc> experimental6non-portable (local universal quantification in ReadP)Safe+,A - represents the version of a software entity.An instance of E is provided, which implements exact equality by first comparing the # fields, followed by comparing the  fields.An instance of = is also provided, which gives lexicographic ordering on the ÿ fields (i.e. 2.1 > 2.0, 1.2.3 > 1.2.2, etc.). This is expected to be sufficient for many uses, but note that you may need to use a more specific ordering for your versioning scheme. For example, some versioning schemes may include pre-releases which have tags "pre1", "pre2"·, and so on, and these would need to be taken into account when determining ordering. In some cases, date ordering may be more appropriate, so the application would have to look for date tags in the G field and compare those. The bottom line is, don't always assume that  and other * operations are the right thing for every .uSimilarly, concrete representations of versions may differ. One possible concrete representation is provided by the   and  i instances, but depending on the application a different concrete representation may be more appropriate.ÿ†The numeric branch for this version. This reflects the fact that most software versions are tree-structured; there is a main trunk which is tagged with versions at various points (1,2,3...), and the first branch off the trunk after version 3 is 3.1, the second branch off the trunk after version 3 is 3.2, and so on. The tree can be branched arbitrarily, just by adding more digits.%We represent the branch as a list of  \, so version 3.2.1 becomes [3,2,1]. Lexicographic ordering (i.e. the default instance of  for [Int]*) gives the natural ordering of branches.¥A version can be tagged with an arbitrary list of strings. The interpretation of the list of tags is entirely dependent on the entity that this version applies to. Convert to a , stripping off the .Convert from a , adding an empty set of . 2Provides one possible concrete representation for . For a version with   = [1,2,3] and  = ["tag1","tag2"], the output will be 1.2.3-tag1-tag2.           old-version-1.3.2Data.Old.Version Data.VersionVersion versionBranch versionTagstoBasefromBaseghc-prim GHC.ClassesEqOrdcomparebaseGHC.ShowShowGHC.ReadRead GHC.TypesInt $fShowVersion$fIsStringVersion $fReadVersion $fOrdVersion