Commit 9119eea7 authored by Pietro Abate's avatar Pietro Abate

[r2005-07-29 09:52:28 by afrisch] Build and install dtd2cduce when PXP is available

Original author: afrisch
Date: 2005-07-29 09:52:29+00:00
parent 51ffd58e
......@@ -121,7 +121,7 @@ help:
# Source directories
DIRS = misc parser schema typing types compile runtime driver query ocamliface
CLEAN_DIRS = $(DIRS) cdo2cmo tools tests
CLEAN_DIRS = $(DIRS) tools tests
# Objects to build
......@@ -193,6 +193,8 @@ endif
ifeq ($(PXP),true)
OBJECTS += runtime/cduce_pxp.cmo
PACKAGES += $(PXP_PACK)
ALL_TARGET += dtd2cduce
INSTALL_BINARIES += dtd2cduce
endif
ifeq ($(EXPAT), true)
OBJECTS += runtime/cduce_expat.cmo
......@@ -237,7 +239,7 @@ cduce_lib.$(EXTENSION_LIB): $(OBJECTS:.cmo=.$(EXTENSION))
dtd2cduce: tools/dtd2cduce.ml
@echo "Build $@"
$(HIDE)$(OCAMLFIND) $(CAML) -o $@ -ccopt -static -package "$(PXP_PACK) cgi" -linkpkg $^
$(HIDE)$(OCAMLFIND) $(CAML) -o $@ -package "$(PXP_PACK) cgi" -linkpkg $^
.PHONY: compute_depend
compute_depend: $(DEPEND_OCAMLDEP)
......
@comment $GODI$
bin/cduce
bin/cduce_mktop
@glob bin/dtd2cduce
man/man1/cduce.1
man/man1/cduce_mktop.1
@deepdir doc/apps-cduce
......
type T = <a>[ <b>[] T* <b>[] <z>[] ];;
type S = <a>[ <x>[] S* <x>[] <z>[] ];;
type T = <a>[ <b>[ <c1>[] ] ]
type S = <a>[ <b>[ <d1>[] ] ]
let f (x : [ T ]) : [ S ] = xtransform x with <c1>_ -> <d1>[]
let fun f (x : [ T ]) : [ S ] =
xtransform x with <b>_ -> [ [ <x>[] ] ]
......@@ -112,6 +112,8 @@ let approx t =
let precise = ref true
(* Note: the precision of this implementation depends on the constraint...
This is bad and should be fixed. *)
let map_tree cstr f seq =
let memo = ref H2.empty in
let rec aux cstr t =
......
......@@ -955,7 +955,20 @@ and type_check' loc env e constr precise = match e with
let res = type_check_branches loc env t b cstr true in
(res,resid)
) t
with (Sequence.Error _) as exn -> raise_loc loc exn
with (Sequence.Error _) as exn ->
let rec find_loc = function
| Location.Location (loc,precise,exn) ->
(loc,precise), exn
| Sequence.Error (Sequence.UnderTag (t,exn)) ->
let (l,exn) = find_loc exn in
l, Sequence.Error (Sequence.UnderTag (t,exn))
| exn -> raise Not_found
in
try
let (loc,precise), exn = find_loc exn in
raise (Location.Location (loc,precise,exn))
with Not_found ->
raise_loc loc exn
in
verify loc t constr
......
......@@ -17,7 +17,9 @@ This page collects some examples of applications that use CDuce.
<ul>
<li>The <a href="http://www.cduce.org/">CDuce</a> site itself.</li>
<li><a href="http://www.random-art.org/">Random Art</a>.</li>
<li><a href="http://www.random-art.org/">Random Art</a>.
(<a href="http://home.andrej.com/aikido/bin/">Source code</a>
for a similar site by the same author, Andrej Bauer.)</li>
<li><a href="http://www.larouedesecours.com/">La roue de
secours</a>.</li>
<li><a href="http://www.editionsvalroc.com/">ditions Valroc</a>.</li>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment