summaryrefslogtreecommitdiff
path: root/lib/ur
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2009-12-08 10:46:50 -0500
committerGravatar Adam Chlipala <adamc@hcoop.net>2009-12-08 10:46:50 -0500
commit778b73af8cd74791c5d2f8cc520d82e3b4e1f5de (patch)
tree7a41d068fbf90d72aa9a1aea897a2143c247f276 /lib/ur
parentc1d821782a8d7948c52d01863508eabe42bd89e9 (diff)
Context globals; ctype functions
Diffstat (limited to 'lib/ur')
-rw-r--r--lib/ur/basis.urs18
-rw-r--r--lib/ur/char.ur16
-rw-r--r--lib/ur/char.urs16
3 files changed, 50 insertions, 0 deletions
diff --git a/lib/ur/basis.urs b/lib/ur/basis.urs
index 31aa4cdd..200d9896 100644
--- a/lib/ur/basis.urs
+++ b/lib/ur/basis.urs
@@ -52,6 +52,24 @@ val ord_time : ord time
val mkOrd : t ::: Type -> {Lt : t -> t -> bool, Le : t -> t -> bool} -> ord t
+(** Character operations *)
+
+val isalnum : char -> bool
+val isalpha : char -> bool
+val isblank : char -> bool
+val iscntrl : char -> bool
+val isdigit : char -> bool
+val isgraph : char -> bool
+val islower : char -> bool
+val isprint : char -> bool
+val ispunct : char -> bool
+val isspace : char -> bool
+val isupper : char -> bool
+val isxdigit : char -> bool
+val tolower : char -> char
+val toupper : char -> char
+
+
(** String operations *)
val strlen : string -> int
diff --git a/lib/ur/char.ur b/lib/ur/char.ur
new file mode 100644
index 00000000..29e181e6
--- /dev/null
+++ b/lib/ur/char.ur
@@ -0,0 +1,16 @@
+type t = char
+
+val isAlnum = Basis.isalnum
+val isAlpha = Basis.isalpha
+val isBlank = Basis.isblank
+val isCntrl = Basis.iscntrl
+val isDigit = Basis.isdigit
+val isGraph = Basis.isgraph
+val isLower = Basis.islower
+val isPrint = Basis.isprint
+val isPunct = Basis.ispunct
+val isSpace = Basis.isspace
+val isUpper = Basis.isupper
+val isXdigit = Basis.isxdigit
+val toLower = Basis.tolower
+val toUpper = Basis.toupper
diff --git a/lib/ur/char.urs b/lib/ur/char.urs
new file mode 100644
index 00000000..02e55632
--- /dev/null
+++ b/lib/ur/char.urs
@@ -0,0 +1,16 @@
+type t = char
+
+val isAlnum : t -> bool
+val isAlpha : t -> bool
+val isBlank : t -> bool
+val isCntrl : t -> bool
+val isDigit : t -> bool
+val isGraph : t -> bool
+val isLower : t -> bool
+val isPrint : t -> bool
+val isPunct : t -> bool
+val isSpace : t -> bool
+val isUpper : t -> bool
+val isXdigit : t -> bool
+val toLower : t -> t
+val toUpper : t -> t