UnitDetails Module
Creates and reads the details of a unit and holds the list with the group, abbreviations, names and synonyms of every known unit.
Functions and values
| Function or value |
Description
|
Full Usage:
apply f ud
Parameters:
UnitDetails -> 'a
ud : UnitDetails
Returns: 'a
Type parameters: 'a |
Utility function to apply a function to a UnitDetails
|
Full Usage:
create un gr ab nm sy
Parameters:
Unit
-
The unit
gr : Group
-
The group
ab : Language
-
The abbreviation
nm : Language
-
The name
sy : string list
-
Synonyms
Returns: UnitDetails
|
Create a UnitDetails
Example
|
Full Usage:
createGeneral n v
Parameters:
string
-
the name for the general unit
v : BigRational
-
the unit value
Returns: UnitDetails
|
Create a UnitDetails for a General unit
Example
|
|
Utility function to enable type inference
|
|
|
|
Get the Dutch string from Abbreviation from a UnitDetails
|
|
Get the Dutch string from Name from a UnitDetails
|
|
Get the English string from Abbreviation from a UnitDetails
|
|
Get the English string from Name from a UnitDetails
|
|
|
|
|
|
|
Full Usage:
getUnitString loc verb
Parameters:
Localization
-
Localization
verb : Verbal
-
Verbality
Returns: UnitDetails -> string
|
Get the string for a unit in a specific language
ExamplegetUnitString English Long (Mass (KiloGram 1N)) = "kilogram" |
|
List of UnitDetails
|
GenPRES