m      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklNone -0>?FGKST5eThis type family is used for translating unit names (as type-level strings) into units. It will be  < for base units or expand the definition for derived units.:The instances displayed by Haddock are available only if Data.UnitsOfMeasure.Defs is imported.BThis is a bit of a hack, honestly, but a good hack. Constraints u ~~ v are just like equalities u ~ va, except solving them will be delayed until the plugin. This may lead to better inferred types.fUnpack a unit as a syntactic representation, where the order of units is deterministic. For example:     = []  []   (  "s"     "m") = ["m","s"]  [],This does not break type soundness because  will reduce only when the unit is entirely constant, and it does not allow the structure of the unit to be observed. The reduction behaviour is implemented by the plugin, because we cannot define it otherwise.)Take the product of a list of base units.EPack up a syntactic representation of a unit as a unit. For example:   ([]  []) =     (["m"]  ["s","s"]) =   "m"     "s" ^: 22This is a perfectly ordinary closed type family.  is a left inverse of  up to the equational theory of units, but it is not a right inverse (because there are multiple list representations of the same unit).RSyntactic representation of a unit as a pair of lists of base units, for example   is represented as []  [] and   "m"     "s" ^: 2 is represented as ["m"]  ["s","s"].A  Quantity a uC is represented identically to a value of underlying numeric type a, but with units u. Warning: the N constructor allows module invariants to be violated, so use it with caution! Exponentiation (to a positive power) for units of measure; negative exponents are not yet supported (they require an Integer kind) Division for units of measure #Multiplication for units of measure  Base unit %Dimensionless unit (identity element)(Kind) Units of measure*Extract the underlying value of a quantity@Zero is polymorphic in its units: this is required because the m; instance constrains the quantity to be dimensionless, so 0 :: Quantity a u is not well typed. Construct a C from a dimensionless value. Note that for numeric literals, the m and n< instances allow them to be treated as quantities directly. Addition (o,) of quantities requires the units to match.Multiplication (p%) of quantities multiplies the units. Subtraction (q,) of quantities requires the units to match. Negation (r,) of quantities is polymorphic in the units.Absolute value (s,) of quantities is polymorphic in the units. The sign (t-) of a quantity gives a dimensionless result. Convert an u quantity into any v type (w). Division (x") of quantities divides the units. Reciprocal (y') of quantities reciprocates the units. Convert a z quantity into any n type ({). Convert any | quantity into a z type (}).Taking the square root (~b) of a quantity requires its units to be a square. Fractional units are not currently supported.  4 8 7 76767None&'+,-;<=>?FGQSTVE - A constraint - xs means that xsM must be a list of base units that is statically known but passed at runtime/ A constraint / u means that uH must be a concrete unit that is statically known but passed at runtime1&Singleton type for lists of base units4PSingleton type for concrete units of measure represented as lists of base unitsWAnnoyingly, base doesn't appear to export enough stuff to make it possible to write a TestEquality SSymbol instance, so we cheat.6Test whether two 4Xs represent the same units, up to the equivalence relation. TODO: this currently uses 6, but in principle it should be possible to avoid it.^Calculate a normal form of a syntactic unit: a map from base unit names to non-zero integers.7BExtract the runtime syntactic representation from a singleton unit82Extract the runtime syntactic representation of a / -./012345678 457/086123-.-./012345None&'+,-;<=>?FGQSTVI>0Render a quantity nicely, followed by its units:'showQuantity (1 /: [u| 0.1 s / m kg |])"10.0 kg m / s"?Render a unit nicely:*showUnit (undefined :: proxy [u| 1 / s |])"s^-1">?>?None &',;<=FVeOAAn existential wrapper type: A p is essentially exists x . p x.CkRepresents a quantity whose units have a syntactic representation that is known statically and at runtime.E:Parse a quantity and check that it has the expected units.F&Parse a quantity along with its units.G Parse a unit.ABCDEFGFGEABCDABCD SafeO NoneP NonejQ{A unit normal form is a signed multiset of atoms; we maintain the invariant that the map does not contain any zero values.An atom in the normal form is either a base unit, a variable or a stuck type family application (but not one of the built-in type families that correspond to group operations).:Base units are just represented as strings, for simplicity7The group identity, representing the dimensionless unit(Construct a normalised unit from an atom2Construct a normalised unit from a single variable3Construct a normalised unit from a single base unitvConstruct a normalised unit from a stuck type family application: this must not be one of the built-in type families!>Construct a normalised unit from a list of atom-exponent pairs^Construct a normalised unit from an atom-exponent map, applying the signed multiset invariant"Multiplication of normalised unitsDivision of normalised units#Expontentiation of normalised unitsInvert a normalised unit$Test whether a unit is dimensionless=Test whether a unit is constant (contains only base literals),Extract the base units if a unit is constantXTest whether an atom is a base unit (but not necessarily a *literal*, e.g. it could be Base b for some variable b)+Test whether an atom is a literal base unit?Test whether all exponents in a unit are divisble by an integerYTest whether a type variable occurs in a unit (possibly under a type family application)FView a unit as a list of atoms in order of ascending absolute exponentDrop a variable from a unit0Divide all the exponents in a unit by an integer=Substitute the first unit for the variable in the second unit778 Nonev@Contains references to the basic unit constructors declared in Data.UnitsOfMeasure, as loaded inside GHC.The Unit+ type constructor, to be promoted to a kindThe Base data constructor of Unit , promoted to a type constructorThe One type familyThe '(*:)' type familyThe '(/:)' type familyThe '(^:)' type familyThe Unpack type familyThe  UnitSyntax+ type constructor, to be promoted to a kindThe data constructor of  UnitSyntax , promoted to a type constructorThe '(~~)' type familyUnit promoted to a kind Is this the Unit kind?TTry to convert a type to a unit normal form; this does not check the type has kind Unit, and may fail even if it does.8Convert a unit normal form to a type expression of kind Unit NoneBPossible results of unifying a single pair of units. In the non-failing cases, we return a substitution and a list of fresh variables that were created.ZA substitution is essentially a list of (variable, unit) pairs, but we keep the original h that lead to the substitution being made, for use when turning the substitution back into constraints.0Apply a substitution to a single normalised unitCompose two substitutionsPAttempt to unify two normalised units to produce a unifying substitution. The b is the equality between the non-normalised (and perhaps less substituted) unit type expressions.NonedIAThe plugin that GHC will load when this module is used with the -fplugin option.yProduce bogus evidence for a constraint, including actual equality constraints and our fake '(~~)' equality constraints.0Make up evidence for a fake equality constraint t1 ~~ t2% by coercing bogus evidence of type t1 ~ t2- (or its heterogeneous variant, in GHC 8.0).IINone+,-7<FQSTV J>Converts a unit to the corresponding canonical representation.K+Two units are convertible if they are both LH and they have the same canonical units (and hence the same dimension).LdA unit is "good" if all its base units have been defined, and have associated canonical base units.MyThis constraint will be satisfied if all the base units in a syntactically represented unit are in their canonical form.NThis constraint will be satisfied if all the base units in a syntactically represented unit have associated canonical representations.]Convert a unit into its canonical representation, where units are represented syntactically.O~Class to capture the dimensions to which base units belong. For a canonical base unit, the class instance can be left empty.P0The canonical base unit for this base unit. If b is canonical, then P b = b. Otherwise, P b must itself be canonical.QNThe conversion ratio between this base unit and its canonical base unit. If b! is canonical then this ratio is 1.R,Automatically convert a quantity with units u so that its units are v , provided u and v have the same dimension.SCalculate the conversion ratio between two units with the same dimension. The slightly unusual proxy arguments allow this to be called using quasiquoters to specify the units, for example S [u| ft |] [u| m |]. JKLMNOPQRS RSOPQQLMNKJOPQQNone-DSTV9 TThe T\ quasiquoter may be used to create units or quantities; its meaning depends on the context:in a declaration context, it creates new base and derived units from a comma-separated list of names with optional definitions, for example [T|kg, m, s, N = kg * m/s^2|];^in a type context, it parses a single unit and converts it into the corresponding type, so [T|m/s|] becomes the type   "m" /:   "s" of kind ;5in an expression context, it can be used to create a 4 corresponding to a numeric literal, for example [T|42 m|] is an expression of type  u (  "m"), [T |-2.2 m|] is an expression of type   (  "m") , and [T|m|] alone is a function of type a ->  a (  "m");]in a pattern context, it can be used to match on a particular value of a quantity with an u or z% representation type, for example f [T | 42 m |] = $ is a (partial) function of type  u [u|m|] -> Bool.XParse a unit expression optionally preceded by a literal, and create a constructor for B with the given units (applied to the literal if one is present).cParse an integer or rational literal followed by a unit expression, and create a pattern match on  u u or  z uJ. Unfortunately we cannot easily support arbitrary representation types.CParse a unit expression and convert it into the corresponding type.6Convert a unit expression into the corresponding type.YParse the string as a mixture of base units and derived units, and create corresponding  type instance declarations.?Parse a comma-separated list of unit declarations, for example: kg, m, s, N = kg * m/s^2UGiven a unit name and an optional definition, create an appropriate instance of the  type family.UYDeclare a canonical base unit of the given name, which must not contain any spaces, e.g. declareBaseUnit "m"produces Etype instance MkUnit "m" = Base "m" instance HasCanonicalBaseUnit "m"This can also be written [T| m |].V?Declare a derived unit with the given name and definition, e.g. #declareDerivedUnit "N" "kg m / s^2"produces Atype instance MkUnit "N" = Base "kg" *: Base "m" /: Base "s" ^: 2This can also be written [T| N = kg m / s^2 |].W]Declare a base unit of the given name, which is convertible to the canonical base unit, e.g. -declareConvertibleUnit "kilobyte" 1024 "byte"produces type instance MkUnit "kilobyte" = Base "kilobyte" instance HasCanonicalBaseUnit "kilobyte" where type CanonicalBaseUnit "kilobyte" = Base "byte" conversionBase _ = [u| 1 % 1024 kilobyte/byte |]This can also be written [T| kilobyte = 1024 byte |]. See Data.UnitsOfMeasure.Convert( for more information about conversions.iRead either an integer or a rational from a string, if possible, and return the remainder of the string.TUVWNone&',-<FGQSTV /RTUVW TUVWR/None3None -;=FT̳ !"#$%&'()*+,-./0123456789:;<=>?@ABBCDEFGHIJKLMNNOOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyzx{|xy}xy~xxyxyxyx{xyx{x{x{x{x{x{xx                          )uom-plugin-0.3.0.0-IpB3KwEjHmxGTxp4uBAKmKData.UnitsOfMeasure.InternalData.UnitsOfMeasure.SingletonData.UnitsOfMeasure.ShowData.UnitsOfMeasure.ReadData.UnitsOfMeasure.PluginData.UnitsOfMeasure.ConvertData.UnitsOfMeasureData.UnitsOfMeasure.DefsPaths_uom_pluginTcPluginExtras%Data.UnitsOfMeasure.Plugin.NormalForm"Data.UnitsOfMeasure.Plugin.Convert Data.UnitsOfMeasure.Plugin.UnifyData.UnitsOfMeasure.THData.UnitsOfMeasure.TutorialMkUnit~~UnpackProdPack UnitSyntax:/Quantity MkQuantity^:/:*:BaseOneUnit unQuantityzeromk+:-:negate'abs'signum' fromInteger'recip' fromRational' toRational'sqrt'$fEqUnitSyntax$fShowUnitSyntax$fNFDataQuantity$fStorableQuantity$fRealFracQuantity$fRealFloatQuantity$fRealQuantity $fNumQuantity$fIntegralQuantity$fFractionalQuantity$fFloatingQuantity$fEnumQuantity $fOrdQuantity $fEqQuantity$fBoundedQuantity KnownListlistSing KnownUnitunitSingSListSNilSConsSUnittestEquivalentSUnit forgetSUnitunitVal$fTestEquality[]SList$fTestEqualityUnitSyntaxSUnit $fKnownList: $fKnownList[] $fKnownUnit:/ showQuantityshowUnit$fShowQuantitySomeQuantityWithUnit readWithUnit readQuantityreadUnit$fReadQuantitypluginToCanonicalUnit ConvertibleGood IsCanonical HasCanonicalHasCanonicalBaseUnitCanonicalBaseUnitconversionBaseconvertratioudeclareBaseUnitdeclareDerivedUnitdeclareConvertibleUnit$fHasCanonicalBaseUnit"mi"$fHasCanonicalBaseUnit"in"$fHasCanonicalBaseUnit"ft"$fHasCanonicalBaseUnit"au"$fHasCanonicalBaseUnit"t"$fHasCanonicalBaseUnit"l"$fHasCanonicalBaseUnit"ha"$fHasCanonicalBaseUnit"d"$fHasCanonicalBaseUnit"h"$fHasCanonicalBaseUnit"min"$fHasCanonicalBaseUnit"sr"$fHasCanonicalBaseUnit"rad"$fHasCanonicalBaseUnit"g"$fHasCanonicalBaseUnit"km"$fHasCanonicalBaseUnit"cd"$fHasCanonicalBaseUnit"mol"$fHasCanonicalBaseUnit"K"$fHasCanonicalBaseUnit"A"$fHasCanonicalBaseUnit"s"$fHasCanonicalBaseUnit"kg"$fHasCanonicalBaseUnit"m"baseGHC.NumNumGHC.Real Fractional+* GHC.TypeNats-negateabssignum integer-gmpGHC.Integer.TypeIntegerIntegral fromInteger/recipRational fromRationalReal toRational GHC.FloatsqrttestEqualitySymbol Unsafe.Coerce unsafeCoercenormaliseUnitSyntaxversion getBinDir getLibDir getDynLibDir getDataDir getLibexecDir getSysconfDirgetDataFileNameghc TcPluginM newUnique newWantedCt newGivenCtcmpTypecmpTypescmpTyConNormUnitAtomBaseUnitoneatomvarUnitbaseUnitfamUnit mkNormUnit mkNormUnitMapinvertisOne isConstant maybeConstantisBase isBaseLiteral divisibleoccurs ascendingleftoverdivideExponents substUnitBaseAtomVarAtomFamAtom _NormUnitUnitDefs unitKindCon unitBaseTyCon unitOneTyConmulTyCondivTyConexpTyCon unpackTyConunitSyntaxTyConunitSyntaxPromotedDataCon equivTyConunitKind isUnitKind normaliseUnit reifyUnit UnifyResultTySubst TcRnTypesCt substsUnit substsSubst unifyUnitsSimplifyResult Simplified ImpossiblesimplifyImpossiblesimplifyRemaining SimplifyStatesimplifyFreshVars simplifySubstsimplifyUnsubstsimplifySolved simplifyStuck UnitEquality SubstItemsiVarsiUnitsiCtsubstsUnitEqualitytoUnitEqualityfromUnitEquality simplifyUnitsWinDrawLoseevMagicmkFunnyEqEvidenceToCBUghc-prim GHC.TypesDoubleTrueuExpuPatuTypeuDec parseUnitDecs declareUnit readNumberUnitDecl DefinedUnitConversionUnit