Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cduce
cduce
Commits
2be608b8
Commit
2be608b8
authored
Oct 05, 2007
by
Pietro Abate
Browse files
[r2003-11-20 11:30:02 by szach] added some Int subtypes corresponding to some XML Schema types
Original author: szach Date: 2003-11-20 11:30:02+00:00
parent
0d53b175
Changes
2
Hide whitespace changes
Inline
Side-by-side
types/builtin_defs.ml
View file @
2be608b8
...
...
@@ -3,6 +3,13 @@ let non_neg_int = Types.interval (Intervals.right (Intervals.V.mk "0"))
let
neg_int
=
Types
.
interval
(
Intervals
.
left
(
Intervals
.
V
.
mk
"-1"
))
let
non_pos_int
=
Types
.
interval
(
Intervals
.
left
(
Intervals
.
V
.
mk
"0"
))
let
mk_interval_type
l
r
=
Types
.
interval
(
Intervals
.
bounded
(
Intervals
.
V
.
mk
l
)
(
Intervals
.
V
.
mk
r
))
let
long_int
=
mk_interval_type
"-9223372036854775808"
"9223372036854775807"
let
int_int
=
mk_interval_type
"-2147483648"
"2147483647"
let
short_int
=
mk_interval_type
"-32768"
"32767"
let
byte_int
=
mk_interval_type
"-128"
"127"
let
pos_intstr
=
Sequence
.
plus
(
Types
.
char
(
Chars
.
char_class
(
Chars
.
V
.
mk_char
'
0
'
)
...
...
types/builtin_defs.mli
View file @
2be608b8
(** 1 .. Inf *)
val
pos_int
:
Types
.
t
(** 0 .. Inf *)
val
non_neg_int
:
Types
.
t
(** -Inf .. -1 *)
val
neg_int
:
Types
.
t
(** -Inf .. 0 *)
val
non_pos_int
:
Types
.
t
(** Some CDuce predefined types *)
val
pos_int
:
Types
.
t
(** 1 .. Inf *)
val
non_neg_int
:
Types
.
t
(** 0 .. Inf *)
val
neg_int
:
Types
.
t
(** -Inf .. -1 *)
val
non_pos_int
:
Types
.
t
(** -Inf .. 0 *)
val
long_int
:
Types
.
t
(** -9223372036854775808 .. 9223372036854775807 *)
val
int_int
:
Types
.
t
(** -2147483648 .. 2147483647 *)
val
short_int
:
Types
.
t
(** -32768 .. 32767 *)
val
byte_int
:
Types
.
t
(** -128 .. 127 *)
val
intstr
:
Types
.
t
val
pos_intstr
:
Types
.
t
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment