Skip to content

Commit

Permalink
shadow update
Browse files Browse the repository at this point in the history
  • Loading branch information
Ingo60 committed Apr 28, 2015
1 parent 346ef76 commit 2121dba
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 2 deletions.
52 changes: 51 additions & 1 deletion shadow/frege/prelude/PreludeBase.fr
Expand Up @@ -410,6 +410,44 @@ data Char = native char where
| Int -> Bool
pure native isLetter java.lang.Character.isLetter :: Char -> Bool
| Int -> Bool
{--
Determines if the specified character is an ISO control character.
A character is considered to be an ISO control character if its code is
in the range "\u0000" through "\u001F"
or in the range "\u007F" through "\u009F".
-}
pure native isISOControl java.lang.Character.isISOControl :: Char Bool
| Int Bool
{--
Determines if the given char value is a Unicode surrogate code unit.
Such values do not represent characters by themselves,
but are used in the representation of supplementary characters
in the UTF-16 encoding.
A char value is a surrogate code unit if and only if
it is either a low-surrogate code unit or a high-surrogate code unit.
-}
pure native isSurrogate java.lang.Character.isSurrogate Char Bool

{--
Determines if the given char value is a Unicode low-surrogate code unit
(also known as trailing-surrogate code unit).
Such values do not represent characters by themselves,
but are used in the representation of supplementary characters in the UTF-16 encoding.
-}
pure native isLowSurrogate java.lang.Character.isLowSurrogate Char Bool

{--
Determines if the given char value is a Unicode high-surrogate code unit
(also known as leading-surrogate code unit).
Such values do not represent characters by themselves,
but are used in the representation of supplementary characters in the UTF-16 encoding.
-}
pure native isHighSurrogate java.lang.Character.isHighSurrogate Char Bool

{--
Determines whether the specified character (Unicode code point)
is in the supplementary character range.
Expand Down Expand Up @@ -488,7 +526,19 @@ data Char = native char where
{--
Determines whether the specified pair of char values is a valid Unicode surrogate pair.
-}
pure native isSurrogatePair java.lang.Character.isSurrogatePair :: Char -> Char -> Bool
pure native isSurrogatePair java.lang.Character.isSurrogatePair :: Char -> Char -> Bool

{--
Returns a value indicating a character's general category.
-}
pure native getType java.lang.Character.getType Char Int
| Int Int

{--
Return the Unicode name of the code point or null if it is unassigned.
-}
pure native getName java.lang.Character.getName Char Maybe String
| Int Maybe String

{--
'String' values are based on Java\'s @java.lang.String@ objects.
Expand Down
1 change: 0 additions & 1 deletion shadow/frege/prelude/PreludeList.fr
Expand Up @@ -76,7 +76,6 @@ import frege.control.Semigroupoid (•)

private type List = []

infixl 16 `!!`
infixr 13 `++`
infix 9 elem notElem

Expand Down

0 comments on commit 2121dba

Please sign in to comment.