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
bba6b878
Commit
bba6b878
authored
Jul 10, 2007
by
Pietro Abate
Browse files
[r2005-06-18 07:09:46 by afrisch] Empty log message
Original author: afrisch Date: 2005-06-18 07:09:46+00:00
parent
28e0f5ee
Changes
3
Hide whitespace changes
Inline
Side-by-side
misc/ns.ml
View file @
bba6b878
...
...
@@ -22,11 +22,8 @@ let split_qname s =
module
P
=
Upool
.
Make
(
U
)
(* module P = Pool.Make(U) *)
include
P
let
value
=
get
let
empty
=
mk
empty_str
let
xml_ns
=
mk
(
U
.
mk
"http://www.w3.org/XML/1998/namespace"
)
let
xsd_ns
=
mk
(
U
.
mk
"http://www.w3.org/2001/XMLSchema"
)
...
...
misc/upool.ml
View file @
bba6b878
...
...
@@ -9,10 +9,12 @@ module type S = sig
val
dummy
:
t
val
mk
:
value
->
t
val
get
:
t
->
value
val
value
:
t
->
value
val
extract
:
unit
->
value
list
val
intract
:
value
list
->
unit
val
from_int
:
int
->
t
end
module
HInt
=
Hashtbl
.
Make
(
struct
type
t
=
int
...
...
@@ -41,16 +43,18 @@ module Make(X : Custom.T) = struct
with
Not_found
->
HInt
.
add
pool
h
v
);
h
let
get
h
=
let
value
h
=
assert
(
h
!=
dummy
);
HInt
.
find
pool
h
let
extract
()
=
HInt
.
fold
(
fun
_
v
accu
->
v
::
accu
)
pool
[]
let
intract
=
List
.
iter
(
fun
v
->
ignore
(
mk
v
))
let
serialize
s
h
=
X
.
serialize
s
(
get
h
)
let
serialize
s
h
=
X
.
serialize
s
(
value
h
)
let
deserialize
s
=
mk
(
X
.
deserialize
s
)
let
check
_
=
()
let
dump
ppf
_
=
()
let
from_int
i
=
i
end
misc/upool.mli
View file @
bba6b878
...
...
@@ -9,10 +9,12 @@ module type S = sig
val
dummy
:
t
val
mk
:
value
->
t
val
get
:
t
->
value
val
value
:
t
->
value
val
extract
:
unit
->
value
list
val
intract
:
value
list
->
unit
val
from_int
:
int
->
t
end
module
Make
(
X
:
Custom
.
T
)
:
S
with
type
value
=
X
.
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