Remove private tags from unicode package

This commit is contained in:
Ayaz Hafiz 2022-04-22 17:10:26 -04:00
parent be56cdf782
commit ee30b85430
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58
2 changed files with 7 additions and 7 deletions

View file

@ -10,12 +10,12 @@ interface Unicode.CodePoint.Internal
[]
## This is just here so that both Unicode.Scalar and Unicode.CodePoint can access it.
CodePoint : [ @CodePoint U32 ]
CodePoint := U32
fromU32Unchecked : U32 -> CodePoint
fromU32Unchecked = \u32 -> @CodePoint u32
fromU32Unchecked = \u32 -> $CodePoint u32
toU32 : CodePoint -> U32
toU32 = \@CodePoint u32 -> u32
toU32 = \$CodePoint u32 -> u32
fromU32 : U32 -> Result CodePoint [ BadCodePoint ]*

View file

@ -18,10 +18,10 @@ interface Unicode.Scalar
]
## A [Unicode Scalar Value](http://www.unicode.org/glossary/#unicode_scalar_value)
Scalar : [ @Scalar U32 ]
Scalar := U32
toStr : Scalar -> Str
toStr = \@Scalar u32
toStr = \$Scalar u32
when Str.fromScalar u32 is
Ok str -> str
Err _ ->
@ -29,10 +29,10 @@ toStr = \@Scalar u32
# this Err branch will never run. That's because it only runs
# if Str.fromScalar receives an invalid scalar value, and we've
# already validated this!
toStr (@Scalar (scalar * 256))
toStr ($Scalar (scalar * 256))
toCodePt : Scalar -> CodePt
toCodePt = \@Scalar u32 -> Internal.fromU32Unchecked u32
toCodePt = \$Scalar u32 -> Internal.fromU32Unchecked u32
fromCodePt : CodePt -> Result Scalar [ PointWasSurrogate ]*