Skip to content

Commit

Permalink
Add new 2022 SI prefixes
Browse files Browse the repository at this point in the history
  • Loading branch information
triallax authored and sharkdp committed Jul 6, 2023
1 parent 6205f66 commit a935f00
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 8 deletions.
4 changes: 2 additions & 2 deletions LICENSE_THIRDPARTY
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
-------------------------------------------------------------------------------------
purescript-arrays 7.2.0
purescript-arrays 7.2.1

Copyright 2018 PureScript

Expand Down Expand Up @@ -1121,7 +1121,7 @@ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

-------------------------------------------------------------------------------------
purescript-quantities 12.1.0
purescript-quantities 12.2.0

MIT License

Expand Down
4 changes: 2 additions & 2 deletions packages.dhall
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Need help? See the following resources:
- Dhall language tour: https://docs.dhall-lang.org/tutorials/Language-Tour.html
-}
let upstream =
https://github.com/purescript/package-sets/releases/download/psc-0.15.8-20230528/packages.dhall
sha256:7f1ebc6968ebabae915640456faf98f52f5606189f48cb22305fbe008723f26c
https://github.com/purescript/package-sets/releases/download/psc-0.15.9-20230629/packages.dhall
sha256:f91d36c7e4793fe4d7e042c57fef362ff3f9e9ba88454cd38686701e30bf545a

in upstream
16 changes: 14 additions & 2 deletions src/Insect/Parser.purs
Original file line number Diff line number Diff line change
Expand Up @@ -166,12 +166,20 @@ prefixDict = Dictionary
, Q.yobi ==> ["yobi", "Yi"]
, Q.atto ==> ["atto", "a"]
, Q.femto ==> ["femto", "f"]
-- peta and mega have to be up here (before pico and milli) in order for the
-- prefixes ('p' and 'm') not to be parsed as 'pico' or 'milli'.
-- peta has to be up here (before pico) in order for the prefix ('p') not to
-- be parsed as 'pico'. This goes for mega through quetta too.
, Q.peta ==> ["peta"]
, Q.mega ==> ["mega"]
, Q.zetta ==> ["zetta"]
, Q.yotta ==> ["yotta"]
, Q.ronna ==> ["ronna"]
, Q.quetta ==> ["quetta"]
, Q.pico ==> ["pico", "p"]
, Q.nano ==> ["nano", "n"]
, Q.quecto ==> ["quecto", "q"]
, Q.ronto ==> ["ronto", "r"]
, Q.yocto ==> ["yocto", "y"]
, Q.zepto ==> ["zepto", "z"]
, Q.micro ==> [ "micro"
, "u" -- u for micro
, "µ" -- Micro sign U+00B5
Expand All @@ -187,6 +195,10 @@ prefixDict = Dictionary
, Q.tera ==> ["tera", "T"]
, Q.peta ==> ["P"]
, Q.exa ==> ["exa", "E"]
, Q.zetta ==> ["Z"]
, Q.yotta ==> ["Y"]
, Q.ronna ==> ["R"]
, Q.quetta ==> ["Q"]
]

-- | Parse a SI or IEC prefix like `µ`, `G`, `pico` or `Ki`.
Expand Down
4 changes: 2 additions & 2 deletions web/third-party-licenses.txt
Original file line number Diff line number Diff line change
Expand Up @@ -990,7 +990,7 @@ The above copyright notice and this permission notice shall be included in all c
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

-------------------------------------------------------------------------------------
purescript-arrays 7.2.0
purescript-arrays 7.2.1

Copyright 2018 PureScript

Expand Down Expand Up @@ -2112,7 +2112,7 @@ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

-------------------------------------------------------------------------------------
purescript-quantities 12.1.0
purescript-quantities 12.2.0

MIT License

Expand Down

0 comments on commit a935f00

Please sign in to comment.