h$uan<      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~                                   (C) 2013 Richard EisenbergBSD-style (see LICENSE)'Richard Eisenberg (rae@cs.brynmawr.edu) experimental non-portableNone./units"Is an element contained in a list?units"Is one list a subset of the other?units-Are two lists equal, when considered as sets?(C) 2013 Richard EisenbergBSD-style (see LICENSE)'Richard Eisenberg (rae@cs.brynmawr.edu) experimental non-portableNone'(./> units%The datatype for type-level integers.units9Check if a type-level integer is in fact a natural numberunitsLess-than comparisonunitsHelper function for divisionunitsDivide two integersunitsNegate an integerunitsMultiply two integers unitsSubtract two integers!unitsAdd two integers"unitsSubtract one from an integer#unitsAdd one to an integer-units Convert a  to an .units)This is the singleton value representing Zero at the term level and at the type level, simultaneously. Used for raising units to powers.9unitsAdd one to a singleton Z.:unitsSubtract one from a singleton Z.;unitsNegate a singleton Z.<unitsConvert a singleton Z to an Int.>  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHI> $%&',+*)(-<#"! 9:;./012345678=>?@ABCDEFGHI7 6!6 None/Xunits4Division of the exponents in a dimension by a scalarYunits:Multiplication of the exponents in a dimension by a scalarZunitsnegate a list of Factors[unitsnegate a single Factor\units$Subtract exponents in two dimensions]unitsSubtract exponents in two dimensions, assuming the lists are ordered similarly.^units?Adds corresponding exponents in two dimension, preserving order_unitsAdds corresponding exponents in two dimension, assuming the lists are ordered similarly.`unitsTake a  [Factor *] and remove any Factors with an exponent of 0aunits Check if two  [Factor *]"s should be considered to be equalbunitsHelper function in ccunitsReorders a to be the in the same order as b, putting entries not in b at the end Reorder [A 1, B 2] [B 5, A 2] ==> [B 2, A 1] Reorder [A 1, B 2, C 3] [C 2, A 8] ==> [C 3, A 1, B 2] Reorder [A 1, B 2] [B 4, C 1, A 9] ==> [B 2, A 1] Reorder x x ==> x Reorder x [] ==> x Reorder [] x ==> [] dunits(Extract s lst) pulls the Factor that matches s out of lst, returning a diminished list and, possibly, the extracted Factor. Extract A [A, B, C] ==> ([B, C], Just A Extract F [A, B, C] ==> ([A, B, C], Nothing) eunits.Do these Factors represent the same dimension?funitsThis will only be used at the kind level. It holds a dimension or unit with its exponent.XYZ[\]^_`abcdefgX7Y7\6]6^6_6a4e4None./hunitsMake a local consistent set of units. The argument is a type-level list of tuple types, to be interpreted as an association list from dimensions to units. For example: type MyLCSU = MkLCSU '[(Length, Foot), (Mass, Gram), (Time, Year)]iunitsAssign a default unit for a dimension. Necessary only when using default LCSUs.hijklmNone-/9>?nunits8This class is used to mark abstract dimensions, such as Length, or Mass.ounitsRetrieve a list of Factors representing the given dimension. Overriding the default of this type family should not be necessary in user code.noNone-./9>?punits,The unit for unitless dimensioned quantitiesrunitsThe dimension for the dimensionless quantities. It is also called "quantities of dimension one", but One. is confusing with the type-level integer One.tunitsClassifies well-formed list of unit factors, and permits calculating a conversion ratio for the purposes of LCSU conversions.units This is like z, but deals with (. It is necessary to be able to define  in the right way.uunitsEssentially, a constraint that checks if a conversion ratio can be calculated for a BaseUnit of a unit.vunitsHelper function in wwunits8Get the canonical unit from a given unit. For example: CanonicalUnit Foot = MeterxunitsIs this unit a canonical unit?yunitsCheck to make sure that a unit has the same dimension as its base unit, if any.{unitsThe base unit of this unit: what this unit is defined in terms of. For units that are not defined in terms of anything else, the base unit should be .|unitsThe dimension that this unit is associated with. This needs to be defined only for canonical units; other units are necessarily of the same dimension as their base.}unitsThe internal list of canonical units corresponding to this unit. Overriding the default should not be necessary in user code.~unitsThe conversion ratio from the base unit to= this unit. If left out, a conversion ratio of 1 is assumed. For example: instance Unit Foot where type BaseUnit Foot = Meter conversionRatio _ = 0.3048Implementations should never examine their argument!unitsCompute the conversion from the underlying canonical unit to this one. A default is provided that multiplies together the ratios of all units between this one and the canonical one.units6Dummy type use just to label canonical units. It does not have a z instance.pqrstuvwxyz~|{}None-/2>?)h unitsThe type of unitless dimensioned quantities. This is an instance of Num, though Haddock doesn't show it. This is parameterized by an LCSU and a number representation.units*Exponentiate a quantity type to an integerunits.Divide two quantity types to produce a new oneunits>Multiply two quantity types to produce a new one. For example: type Velocity = Length %/ TimeunitsMake a quantity type with a unit and LCSU with custom numerical type. The quantity will have the dimension corresponding to the unit.units?Make a quantity type with a given unit. It will be stored as a ). Note that the corresponding dimension must# have an appropriate instance for i for this to work.units;Make a quantity type with a custom numerical type and LCSU.unitsMake a quantity type capable of storing a value of a given unit. This uses a ' for storage of the value. For example: data LengthDim = LengthDim instance Dimension LengthDim data Meter = Meter instance Unit Meter where type BaseUnit Meter = Canonical type DimOfUnit Meter = LengthDim type instance DefaultUnitOfDim LengthDim = Meter type Length = MkQu_D LengthDimNote that the dimension must' have an instance for the type family i for this to work.units< adds a dimensional annotation to its numerical value type n0. This is the representation for all quantities.units9Convert a raw number into a unitless dimensioned quantityunitsMultiply two quantitiesunitsDivide two quantitiesunitsRaise a quantity to a integer power, knowing at compile time that the integer is non-negative.units9Raise a quantity to a integer power known at compile timeunitsTake the n'th root of a quantity, where n is known at compile timeunitsCompare two quantitiesunits3Check if one quantity is less than a compatible oneunits6Check if one quantity is greater than a compatible oneunits?Check if one quantity is less than or equal to a compatible oneunitsCheck if one quantity is greater than or equal to a compatible oneunitsCheck if two quantities are equal (uses the equality of the underlying numerical type)units%Check if two quantities are not equalunitsCompare two compatible quantities for approximate equality. If the difference between the left hand side and the right hand side arguments are less than or equal to the epsilon, they are considered equal.units?Compare two compatible quantities for approixmate inequality. $qNapprox e a b = not $ qApprox e a bunitsDivide a scalar by a quantityunitsSquare a quantityunitsCube a quantityunits"Take the square root of a quantityunits!Take the cubic root of a quantityunitsUse this to choose a default LCSU for a dimensioned quantity. The default LCSU uses the i$ representation for each dimension.units;The number 1, expressed as a unitless dimensioned quantity.unitsCast between equivalent dimension within the same CSU. for example [kg m s] and [s m kg]. See the README for more info.unitsepsilonunitsleft hand sideunitsright hand sideunitsepsilonunitsleft hand sideunitsright hand side!8777788444444447(C) 2013 Richard EisenbergBSD-style (see LICENSE)'Richard Eisenberg (rae@cs.brynmawr.edu) experimental non-portableUnsafe*unitsA basic wrapper around  that has more instances.(C) 2013 Richard EisenbergBSD-style (see LICENSE)'Richard Eisenberg (rae@cs.brynmawr.edu) experimental non-portableNone -./>?+None -/>-units!A class for user-defined prefixesunitsThis should return the desired multiplier for the prefix being defined. This function must not inspect its argument.unitsMultiply a conversion ratio by some constant. Used for defining prefixes.units.Raise a unit to a power, known at compile timeunits$Divide two units to get another unitunits6Multiply two units to get another unit. For example: #type MetersSquared = Meter :* Meter 9 9 887777None./2 units Check if the m4 can convert into the given one, at the given unit.units Check if the m9 can convert into the given one, at the given dimension.units0Check if an LCSU can express the given dimensionunitsCheck if an LCSU has consistent entries for the given unit. i.e. can the lcsu describe the unit?unitsGiven a list of unit factors, extract out the canonical units they are based on.units Check if two  [Factor *]s, representing units#, should be considered to be equalunitsLike 1, but takes a dimension, not a dimension factors.units7Are two LCSUs inter-convertible at the given dimension?unitsCheck if a (dimension factors, LCSU) pair are valid to be used together. This checks that each dimension maps to a unit of the correct dimension.unitsCheck if a (dimension factors, LCSU, unit) triple are all valid to be used together.units7Extract a unit from a dimension factor list and an LCSUunits/Extract a unit specifier from a list of factorsunits4Extract a dimension specifier from a list of factors 42(C) 2014 Richard Eisenberg, (C) 2015 Tobias MarkusBSD-style (see LICENSE)'Richard Eisenberg (rae@cs.brynmawr.edu) experimental non-portableNone-/0>?>$unitsThe number 0, polymorphic in its dimension. Use of this will often require a type annotation.units$Add two compatible vector quantitiesunitsNegate a vector quantityunits"Subtract two compatible quantitiesunits$Take the sum of a list of quantitiesunits/Multiply a scalar quantity by a vector quantityunits/Multiply a vector quantity by a scalar quantityunits-Divide a vector quantity by a scalar quantityunits'Divide a quantity by a plain old numberunits7Multiply a quantity by a plain old number from the leftunits8Multiply a quantity by a plain old number from the rightunitsReturn a default basis, where each basis element measures 1 of the unit provided.unitsReturn a default basis for the vector space provided. Each basis element measures 1 of the unit provided.units/Produce a diagonal (scale) matrix from a vectorunits.Outer (tensor) product of two quantity vectorsunits8Create a unit vector from a setter and a choice of unit.units2Take a inner (dot) product between two quantities.unitsSquare the length of a vector.unitsLength of a vector.unitsVector in same direction as given one but with length of one. If given the zero vector, then return it. The returned vector is dimensionless.units qProject u v computes the projection of v onto u.unitsCross product of 3D vectors.units+Square of the distance between two vectors.unitsDistance between two vectors.unitsSubtract point quantities.unitsAdd a point to a vector.unitsSubract a vector from a point.units*Square of the distance between two points.unitsDistance between two points.unitsExtracts a numerical value from a dimensioned quantity, expressed in the given unit. For example: 7inMeters :: Length -> Double inMeters x = numIn x Meteror inMeters x = x # MeterunitsInfix synonym for numInunits>Creates a dimensioned quantity in the given unit. For example: (height :: Length height = quOf 2.0 Meteror height = 2.0 % MeterunitsInfix synonym for quOfunits.Dimension-keeping cast between different CSUs.unitsCompute the argument in the  DefaultLCSU, and present the result as lcsu-polymorphic dimension-polymorphic value. Named constant because one of its dominant usecase is to inject constant quantities into dimension-polymorphic expressions.units:Show a dimensioned quantity in a given unit. (The default Show7 instance always uses units as specified in the LCSU.)$$ 66777777759 1(C) 2013 Richard EisenbergBSD-style (see LICENSE)'Richard Eisenberg (rae@cs.brynmawr.edu) experimental non-portableNone?"XYZ[\]^_`abcdefgjkotuvwxy}kjyxwvut}fgedcba`_^]\[ZYXo(C) 2014 Richard EisenbergBSD-style (see LICENSE)'Richard Eisenberg (rae@cs.brynmawr.edu) experimental non-portableNone -/?J$units0Make a point quantity from a non-point quantity.unitsA Point n is an affine space built over n. Two Points cannot be added, but they can be subtracted to yield a difference of type n.unitsThe number 0, polymorphic in its dimension. Use of this will often require a type annotation.unitsAdd two compatible quantitiesunitsNegate a quantityunits"Subtract two compatible quantitiesunits$Take the sum of a list of quantitiesunits/Multiply a scalar quantity by a vector quantityunits/Multiply a vector quantity by a scalar quantityunits-Divide a vector quantity by a scalar quantityunitsDivide a quantity by a scalarunits-Multiply a quantity by a scalar from the leftunits.Multiply a quantity by a scalar from the rightunits2Take a inner (dot) product between two quantities.unitsSquare the length of a vector.unitsLength of a vector.unitsVector in same direction as given one but with length of one. If given the zero vector, then return it. The returned vector is dimensionless.units qProject u v computes the projection of v onto u.unitsCross product of 2D vectors.unitsCross product of 3D vectors.units.Make a point quantity at the given unit. Like .unitsInfix synonym of units8Extract the numerical value from a point quantity. Like .unitsInfix synonym for .unitsSubtract point quantities.unitsAdd a point to a vector.unitsSubract a vector from a point.units*Square of the distance between two points.unitsDistance between two points.unitsExtracts a numerical value from a dimensioned quantity, expressed in the given unit. For example: 7inMeters :: Length -> Double inMeters x = numIn x Meteror inMeters x = x # MeterunitsInfix synonym for units>Creates a dimensioned quantity in the given unit. For example: (height :: Length height = quOf 2.0 Meteror height = 2.0 % MeterunitsInfix synonym for units.Dimension-keeping cast between different CSUs.unitsCompute the argument in the  DefaultLCSU, and present the result as lcsu-polymorphic dimension-polymorphic value. Named  because one of its dominant usecase is to inject constant quantities into dimension-polymorphic expressions.units:Show a dimensioned quantity in a given unit. (The default Show7 instance always uses units as specified in the LCSU.) !"#./0123456789:;XYZ[\]^_`abcdefghijklmnoopqrstuvwxyz}{|~}nz{|~rspqhlmi#"! ./0123456789:;66777777755666551 (C) 2013 Richard EisenbergBSD-style (see LICENSE)'Richard Eisenberg (rae@cs.brynmawr.edu) experimental non-portableNone-/>?RunitsExtracts a numerical value from a dimensioned quantity, expressed in the given unit. For example: 7inMeters :: Length -> Double inMeters x = numIn x Meteror inMeters x = x # MeterunitsInfix synonym for units>Creates a dimensioned quantity in the given unit. For example: (height :: Length height = quOf 2.0 Meteror height = 2.0 % MeterunitsInfix synonym for units:Show a dimensioned quantity in a given unit. (The default Show7 instance always uses units as specified in the LCSU.)units.Dimension-keeping cast between different CSUs.unitsCompute the argument in the  DefaultLCSU, and present the result as lcsu-polymorphic dimension-polymorphic value. Named  because one of its dominant usecase is to inject constant quantities into dimension-polymorphic expressions.unitsThe number 0, polymorphic in its dimension. Use of this will often require a type annotation.unitsAdd two compatible quantitiesunits"Subtract two compatible quantitiesunits$Take the sum of a list of quantitiesunitsNegate a quantityunits-Multiply a quantity by a scalar from the leftunits.Multiply a quantity by a scalar from the rightunitsDivide a quantity by a scalar !"#./0123456789:;=>?@ABCDEFGHIXYZ[\]^_`abcdefghijklmnoopqrstuvwxyz}{|~}nz{|~rspqhlmi#"! ./0123456789:;=>?@ABCDEFGHI55166777 (C) 2014 Richard EisenbergBSD-style (see LICENSE)'Richard Eisenberg (rae@cs.brynmawr.edu) experimental non-portableNonebrunits Evaluates a type as far as it can. This is useful, say, in instance declarations: 1instance Show $(evalType [t| Length |]) where ... Without the ), the instance declaration fails because Length mentions type families, which can't be used in instance declarations.This function is somewhat experimental, and will likely not work with more polymorphic types. (If it doesn't work, not all of the type families will be evaluated, and the instance declaration will fail. This function should never cause  incorrect behavior.)units*Declare a new dimension of the given name: $(declareDimension "Length")produces .data Length = Length instance Dimension LengthunitsConditionally generates a Show instanceunits0declareCanonicalUnit unit_name dim (Just abbrev) creates a new canonical unit (that is, it is not defined in terms of other known units) named  unit_name, measuring dimension dim. abbrev) will be the abbreviation in the unit's Show4 instance. If no abbraviation is supplied, then no Show instance will be generated.Example usage: 8$(declareCanonicalUnit "Meter" [t| Length |] (Just "m"))units?declareDerivedUnit unit_name base_unit_type ratio (Just abbrev)4 creates a new derived unit, expressed in terms of base_unit_type. ratio> says how many base units are in the derived unit. (Thus, if  unit_name is Minute and base_unit_type is ''Second, then ratio would be 60.) abbrev, if supplied, becomes the string produced in the derived unit's Show. instance. If no abbreviation is supplied, no Show instance is generated.Example usage: <$(declareDerivedUnit "Minute" [t| Second |] 60 (Just "min"))units'declareMonoUnit unit_name (Just abbrev) creates a new derived unit, intended for use without unit polymorphism. The same type stands for both the unit and dimension, and the instance of i5 is set up accordingly. Use this function (with the  imports) if you don't want to bother with LCSUs and just want to get to work. The abbrev', if supplied, creates an appropriate Show instance. %$(declareMonoUnit "Meter" (Just "m"))produces all of the following data Meter = Meter instance Dimension Meter instance Unit Meter where type BaseUnit Meter = Canonical type DimOfUnit Meter = Meter type instance DefaultUnitOfDim Meter = Meter instance Show Meter where show _ = "m"0After a declaration like this, you probably want type Length = MkQu_U MeterThis last line is not generated, as it is easy enough for you to write, and it involves a new name (Length).units*declareConstant const_name value unit_type* creates a new numerical constant, named  const_name. Its numerical value is value expressed in units given by  unit_type. The constant is polymorphic in both its LCSU and numerical representation. For example, declareConstant "gravity_g" 9.80665 [t| Meter :/ Second :^ Two |]yields gravity_g :: ( Fractional n , CompatibleUnit lcsu (Meter :/ Second :^ Two) ) => MkQu_ULN (Meter :/ Second :^ Two) lcsu n gravity_g = 9.80665 % (undefined :: Meter :/ Second :^ Two) (C) 2014 Richard EisenbergBSD-style (see LICENSE)'Richard Eisenberg (rae@cs.brynmawr.edu) experimental non-portableNone-/eunitsThe & type associated with a member of the  classunits allows for easy conversions in and out of quantities. For example, say you are working with an outside library for time that defines UTCTime, where that stores the time measured in seconds. You could say instance Quantity UTCTime where type QuantityUnit = Second fromQuantity = ... toQuantity = ...)Then, conversions are easy and unit-safe.unitsThe unit associated with t.unitsThe LCSU associated with t. Defaults to m.units-The numerical representation associated with t. Defaults to . (C) 2014 Richard EisenbergBSD-style (see LICENSE)'Richard Eisenberg (rae@cs.brynmawr.edu) experimental non-portableNone-/hunitsThe type of unitless dimensioned quantities. This is an instance of Num, though Haddock doesn't show it. This assumes a default LCSU and an internal representation of Double.unitsExtracts a numerical value from a dimensioned quantity, expressed in the given unit. For example: 7inMeters :: Length -> Double inMeters x = numIn x Meteror inMeters x = x # MeterunitsInfix synonym for units>Creates a dimensioned quantity in the given unit. For example: (height :: Length height = quOf 2.0 Meteror height = 2.0 % MeterunitsInfix synonym for  !"#./0123456789:;=>?@ABCDEFGHIXYZ[\]^_`abcdefghijklmnoopqrstuvwxyz~|}{{|} !"#./0123456789:;=>?@ABCDEFGHIXYZ[\]^_`abcdefghijklmnopqrstuvwxyz~|}{55(C) 2014 Richard EisenbergBSD-style (see LICENSE)'Richard Eisenberg (rae@cs.brynmawr.edu) experimental non-portableNonenunits#makeQuasiQuoter "qq" prefixes units makes a quasi-quoter named qq that considers the prefixes and units provided. These are provided via names of the type constructors, not the data constructors. See the module documentation for more info and an example.units+Gets a list of the names of all units with Show$ instances in scope. Example usage: ?$( do units <- allUnits makeQuasiQuoter "unit" [] units )units3Gets a list of the names of all unit prefixes with Show$ instances in scope. Example usage: $( do units <- allUnits prefixes <- allPrefixes makeQuasiQuoter "unit" prefixes units )       !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopq r s t u v w x y z { | } ~   !                                    units-2.4.1.3-inplaceData.Metrology.ZData.Metrology.ParserData.Metrology.SetData.Metrology.InternalData.Metrology.VectorData.Metrology.UnsafeData.Metrology.ShowData.Metrology.LinearData.Metrology.PolyData.Metrology.THData.Metrology.QuantityData.MetrologyData.Metrology.FactorData.Metrology.LCSUData.Metrology.DimensionsData.Metrology.UnitsData.Metrology.QuData.Metrology.CombinatorsData.Metrology.ValidityData MetrologyZZeroSPnts-prsr-0.1.1.3-327d61ecText.Parse.Units parseUnit mkSymbolTablePowDivMultUnitUnityUnitExp SymbolTablesngltns-2.7-c0d2fbc2Data.Singletons.InternalSingElemSubsetSetEqualMFiveMFourMThreeMTwoMOneFiveFourThreeTwoOne NonNegative<#/Negate#*#-#+PredSuccSZSZeroSSSPPSym1PSym0SSym1SSym0ZeroSym0zToIntsZerosOnesTwosThreesFoursFivesMOnesMTwosMThreesMFoursMFivesSuccsPredsNegateszToIntpZeropOnepTwopThreepFourpFivepMOnepMTwopMThreepMFourpMFivepSuccpPred$fSuppressUnusedWarnings->SSym0$fSuppressUnusedWarnings->PSym0$fPEqZ$fSingI->PSym0 $fSingIZP$fSingI->SSym0 $fSingIZS $fSingIZZero$fTestCoercionZSZ$fTestEqualityZSZ $fSDecideZ$fSEqZ $fSingKindZ$fEqZ@/@*NegListNegDim@-@@-@+@@+ Normalize@~Reorder'ReorderExtract$=FactorFMkLCSUDefaultUnitOfDim LookupListLookupLCSU DefaultLCSU Dimension DimFactorsOfNumber Dimensionless UnitFactorBaseHasConvRatioCanonicalUnit' CanonicalUnit IsCanonicalDimOfUnitIsConsistentBaseUnit DimOfUnit UnitFactorsOfconversionRatio CanonicalCount%^%/%*MkQu_ULNMkQu_UMkQu_DLNMkQu_DQuquantity|*||/||^|^^qNthRootqCompare|<||>||<=||>=||==||/=|qApproxqNapprox/|qSqqCubeqSqrt qCubeRoot defaultLCSUunityredimUnsafeQuqu$fTraversableUnsafeQu$fFoldableUnsafeQu$fApplicativeUnsafeQu$fFunctorUnsafeQu$fShowQu$fShowUnitFactor:$fShowUnitFactor[] UnitPrefix multiplier:@:^:/:*DefaultConvertibleLCSU_UDefaultConvertibleLCSU_D CompatibleDimCompatibleUnitCanonicalUnitsOfFactors*~ConvertibleLCSUs_DConvertibleLCSUsValidDLValidDLUUnitOfDimFactorsMultUnitFactorsMultDimFactorszeroV|^+^|qNegateV|^-^|qSumV|*^||^*||^/||^/*^||^*qBasis qBasisForqScaledqOuterqUnit|.| qQuadranceqNormqSignormqProjectqCrossqQd qDistance|.-.||.+^||.-^|qQdA qDistanceAnumInV^#quOfV^%convertV constantVshowInVQPointPointzero|+|qNegate|-|qSum|/*||* qMagnitudeSq qMagnitude qNormalizedqCross2qCross3 quOfPoint%. pointNumIn.# qDistanceSqnumIn#quOf%convertconstantshowIn$fAffineSpacePoint $fShowPoint $fEqPoint $fEnumPoint$fBoundedPointevalType checkIsTypedeclareDimensiondeclareCanonicalUnitdeclareDerivedUnitdeclareMonoUnitdeclareConstant QuantityQuQuantity QuantityUnit QuantityLCSU QuantityRep fromQuantity toQuantity $fQuantityQu parseUnitExp parseUnitTypemakeQuasiQuoterallUnits allPrefixesZDivghc-prim GHC.TypesInt HasConvRatiocanonicalConvRatiocanonicalConvRatioSpecUnits baseUnitRatioDoublemaybeMkShowInstance