First, a little aside: I love the design of this library. I made a units library following a similar strategy for Matlab at work, but this is way more slick with typeclasses and good unit tracking. I think it fits into a nice space compared to the way more complicated units libraries (e.g. dimensional, NumericPrelude). I have some ideas for possible improvements that I'll write about in a separate issue.
This PR adds the SI unit prefixes and their symbols as value transformers, so centimeter can be written as (centi m) or (_c m). I also updated some of the unit definitions to use the symbols as an example.
My files are auto-formatted with stylish haskell, which is why there are seemingly silly white space changes. The PR also pushes source into a high level src directory, consistent with the default behavior of cabal init. I had to do this to get the library to build on NixOS, but I believe it's also the more widely used convention.
First, a little aside: I love the design of this library. I made a units library following a similar strategy for Matlab at work, but this is way more slick with typeclasses and good unit tracking. I think it fits into a nice space compared to the way more complicated units libraries (e.g. dimensional, NumericPrelude). I have some ideas for possible improvements that I'll write about in a separate issue.
This PR adds the SI unit prefixes and their symbols as value transformers, so centimeter can be written as (centi m) or (_c m). I also updated some of the unit definitions to use the symbols as an example.
My files are auto-formatted with stylish haskell, which is why there are seemingly silly white space changes. The PR also pushes source into a high level src directory, consistent with the default behavior of cabal init. I had to do this to get the library to build on NixOS, but I believe it's also the more widely used convention.