úÎnÄg_      Safe-InferredIView the source code for this declaration to see what units and prefixes  are defined by default. IThis string holds the definitions for units and prefixes. Base units are L defined by the name of the unit, the name of the base in brackets, and any @ aliases for the unit after that, all separated by equal signs: meter =  [length] = m@. Prefixes are defined by placing a dash after all identifiers, ' and providing a value for the prefix: milli- = 1e-3 = m-. Other units are  defined by using previously defined units in an expression: minute = 60 *  second = min. !The reason these definitions aren'%t placed in a text file is so you don't N have to operate your whole program in the IO monad. Theoretically, a user of N this package can create their own definitions file or modify this one, but a  mechanism for doing so hasn't been created yet. JThese definitions are taken almost verbatim from the Pint unit conversion @ library for the Python programming language. Check them out on   https://github.com/hgrecco/pintGitHub.  Safe-Inferred "Map from symbol to base units and # conversion factor to those units. *Map from alias to symbol. Symbols without ' aliases are present as identity maps. (List of all units (no aliases). Used in ( prefix parser, and to detect duplicate  definitions. (List of all prefixes (no aliases). Used + in prefix parser, and to detect duplicate  prefix definitions. #Multiplicative factor of prefixes. !Map from prefix alias to prefix. %Map from base symbols to unit types. !'Hash of the definitions string used to ' create definitions. Defaults to -1 if ! modified or no string was used. %Useful for monadic computations with s. Some examples:  - computation :: QuantityComputation Quantity  computation = do  x <- fromString "mile/hr"  y <- unitsFromString "m/s"  convert x y Returns Right 0.44704 meter / second  - computation :: QuantityComputation Quantity  computation = do  x <- fromString "BADUNIT"  convertBase x Returns Left (UndefinedUnitError BADUNIT) Custom error type -Used when two quantities come from different  Definitions. %Used when a string cannot be parsed. 4Used internally when defining units and a prefix is  already defined. 2Used internally when defining units and a unit is  already defined. 5Used when converting units that do not have the same 4 dimensionality (example: convert meter to second). -Used when trying to parse an undefined unit. $Combination of magnitude and units. !Numerical magnitude of quantity. $magnitude <$> fromString "100 N * m" Right 100.0  Units associated with quantity.  units <$> fromString "3.4 m/s^2"Right [meter,second ** -2.0]",Representation of single unit. For example: "mm^2" is  represented as @ SimpleUnit { symbol = "meter", prefix = "milli", power = 2.0 } #+String representation of a unit. Examples: meter, foot $%Show a single unit, but prepend with % if negative &CConvenience function to extract SimpleUnit collection from Quantity's  CompoundUnit. '9Convenience function to extract Definitions from Quantity's CompoundUnit. (;Convenience function to make quantity with no definitions. )*Sort units but put negative units at end. *ACombines equivalent units and removes units with powers of zero. +*Inverts unit by negating the power field. Multiplies two quantities. Divides two quantities. (Exponentiates a quantity with a double. ,#Combine two Definitions structures ?- !./012345678 9 :;<"=>?@#$&'()*ABC+D,EFGHI:- !./012345678 9 :;<"=>?@#$&'()*ABC+D, - !. 52/678348018  9 :;<"=>?@#$&'()*ABC+D,EFGHI Safe-Inferred !Convert quantity to given units. 3convert <$> fromString "m" <*> unitsFromString "ft"$Right (Right 3.280839895013123 foot)&Convert a quantity to its base units. #convertBase <$> fromString "newton"'Right 1000.0 gram meter / second ** 2.0J!Convert quantity to given units. K&Convert a quantity to its base units. L/Converts a composite unit to its base quantity M-Converts a simple unit to its base quantity. %Computes dimensionality of quantity. &dimensionality <$> fromString "newton" Right [length,mass,time ** -2.0]>Adds two quantities. Second quantity is converted to units of  first quantity. BSubtract two quantities. Second quantity is converted to units of  first quantity. NJKLMOP NJKLMOP NJKLMOP Safe-InferredQBConverts string to a Quantity using an expression grammar parser. RConvert prefixes and synonyms SGConverts string to a Quantity using an expression grammar parser. This F parser does not parser addition or subtraction, and is used for unit  definitions. +QTUVWXYZ[\]^_`abcdefghiRjklSmnopqrstuvwxyz{+QTUVWXYZ[\]^_`abcdefghiRjklSmnopqrstuvwxyz{+QTUVWXYZ[\]^_`abcdefghiRjklSmnopqrstuvwxyz{ Safe-Inferred|@Parse multiline string of definitions (say, from a file) into a  list of definitions. }Parse any definition line ~(Parse a line containing unit definition  Ex: minute = 60 s = min &Parse line containing base definition  Ex: meter = [length] = m €(Parse line containing prefix definition  Ex: milli- = 1e-3 = m- Parse a symbol for a unit |‚}ƒ~„…†€‡ˆ |‚}ƒ~„…†€‡ˆ |‚}ƒ~„…†€‡ˆ Safe-Inferred#Convert string of definitions into  structure. See source  code for  for an example. ‰#Computes intersection of two lists ŠVariant of the DJB2 hash;  *http://stackoverflow.com/a/9263004/1333514 ‹IAdd a hash of the definitions string to a group of Definitions. Meant to G be the last step, after definitions are created. Used for Definitions  comparison. ŒމЋŒމЋŒމЋ  Safe-Inferred/Create a Quantity by parsing a string. Uses an   for : undefined units. Handles arithmetic expressions as well. fromString "25 m/s"Right 25.0 meter / secondfromString "fakeunit"$Left (UndefinedUnitError "fakeunit")fromString "ft + 12in"Right 2.0 foot:Make sure not to use dimensional quantities in exponents. fromString "m ** 2"Right 1.0 meter ** 2.0fromString "m ** (2s)"cLeft (ParserError "Used non-dimensionless exponent in ( Right 1.0 meter ) ** ( Right 2.0 second )")+Create quantities with custom definitions.  ) (Right d) = readDefinitions myDefString  myFromString = fromString' d myFromString "25 m/s"Right 25.0 meter / second)Parse units from a string. Equivalent to fmap units . fromString unitsFromString "N * s"Right [newton,second] Safe-Inferred   ‘     ! "#$%&'()*+,-./01234567 89:;<.=>?@ABC+DEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“” • –—quantities-0.2.0Data.QuantitiesData.Quantities.DefaultUnitsData.Quantities.DataData.Quantities.ConvertData.Quantities.ExprParser Data.Quantities.DefinitionParserData.Quantities.DefinitionsdefaultDefStringData.Quantities.Constructors DefinitionsQuantityComputation QuantityErrorDifferentDefinitionsError ParserErrorPrefixAlreadyDefinedErrorUnitAlreadyDefinedErrorDimensionalityErrorUndefinedUnitErrorQuantity magnitudeunits CompoundUnitmultiplyQuants divideQuants exptQuantsconvert convertBasedimensionality addQuantssubtractQuantsreadDefinitions fromString fromString'unitsFromStringbasessynonyms unitsListprefixes prefixValuesprefixSynonyms unitTypes defStringHash SimpleUnitSymbol showCompUnit'baseGHC.Real/units'defs' baseQuantshowSort reduceUnitsinvertSimpleUnitunionDefinitions DefinitionUnitDefinition defSymbolquantityBaseDefinitiondimBasePrefixDefinition defPrefixfactor defSynonymsdefssUnitssymbolprefixpower reduceUnits' removeZeros invertUnitsemptyDefinitions$fEqDefinitions $fEqQuantity$fShowQuantity$fShowCompoundUnit$fShowSimpleUnitconvert' convertBase'toBase simpleToBase unityQuantdimensionality' linearQuantsEQuantpreprocessQuantity parseMultExprspaces'parseExprQuant parseExpr parseExpr' parseTerm parseFactor parseExptparseNestedExpr parseExptOp parseTermOp parseFactorOpaddOpmulOpexptOp addEQuantssubtractEQuantsmultiplyEQuants divideEQuants exptEQuantsparseESymbolNum parseESymbol parseENumpreprocessUnit prefixParser prefixParser'parseMultExpr'parseMultFactor parseMultExptparseMultNestedExprparseMultExptOpparseMultFactorOp mulMultOp exptMultOpexptMultQuants'parseSymbolNum parseSymbol'parseNum parseNum'parseExponential timesSignparseDefinitionsparseDef parseDefLine parseBaseLineparsePrefixLine parseSymbolparseDefinitions'eol parseUnitDef parseSynonym parseBase parsePrefixparsePrefixSynonym checkDefinedhashaddDefinitionsHash DefineMonadmakeDefinitions addDefinitiondefaultDefinitionsd