Hello! I am happy to publicly announce the quantities package: Hackage: http://hackage.haskell.org/package/quantities Github: https://github.com/jdreaver/quantities
I feel this package is complete enough as of version 0.3.0 (released today) to announce it to the public. >From the description on Hackage: A library for creating and manipulating physical quantities, which are a numerical value associated with a unit of measurement. Included is an expression parser and a huge list of predefined quantities with which to parse strings into a Quantity datatype. Once created, a quantity can be converted to different units or queried for its dimensionality. A user can also operate on quantities arithmetically, and doing so uses automatic unit conversion and simplification. Just to get a taste of how this package works, here are some examples: >>> fromString "25 m/s" Right 25.0 meter / second >>> fromString "fakeunit" Left (UndefinedUnitError "fakeunit") >>> fromString "ft + 12in" Right 2.0 foot >>> fromString "min => s" Right 60.0 second >>> fromString "2 ft + 6 in => ft" Right 2.5 foot >>> fromString "5 m => s" Left (DimensionalityError [length] [time]) >>> convertBase <$> fromString "N * m" Right 1000.0 gram meter ** 2 / second ** 2 >>> dimensionality <$> fromString "N * m" Right [length] ** 2 [mass] / [time] ** 2 Finally, this is my first Haskell library. I am open to *any* suggestions/criticism, especially in regards to code style, the API, the cabal file structure, etc. Thanks, John David Reaver
_______________________________________________ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell