Commit 2874257c authored by POGODALLA Sylvain's avatar POGODALLA Sylvain
Browse files

Changing warnings raising message and adapting ./configure to support...

Changing warnings raising message and adapting ./configure to support compilation without considering warnings as errors
parent 033e0ec8
...@@ -27,7 +27,7 @@ end ...@@ -27,7 +27,7 @@ end
# form parse a:o; # form parse a:o;
-> 2 analyses. -> 2 analyses.
+ [ ] Bug: analyse d'une constante image d'une constante lève une exception: + [X] Bug: analyse d'une constante image d'une constante lève une exception:
signature trees = signature trees =
tree:type; tree:type;
...@@ -57,11 +57,13 @@ end ...@@ -57,11 +57,13 @@ end
acg-data directory) acg-data directory)
+ [X] améliorer le pretty-printing des termes + [X] améliorer le pretty-printing des termes
+ [X] ajouter dépendence à ocf + [X] ajouter dépendence à ocf
+ [ ] ajouter dépendence à Ocaml 4.02.1 ? (requis par ocf) + [X] ajouter dépendence à Ocaml 4.02.1 ? (requis par ocf)
+ [ ] ajouter parsing de types non atomiques + [ ] ajouter parsing de types non atomiques
+ [ ] ajouter détection de nbre infini de solutions + [ ] ajouter détection de nbre infini de solutions
+ [ ] permettre à ./acg de charger des fichiers .acgo + [ ] permettre à ./acg de charger des fichiers .acgo
+ [ ] OPAM: enlever les warnings qui deviennent des erreurs + [ ] OPAM: enlever les warnings qui deviennent des erreurs
+ [ ] utiliser UF avec tableaux destructifs, et tester l'amélioration des performances
+ [ ] autoriser l'utilisation de symboles non fonctionnels
** DONE Faire un Bolt package ** DONE Faire un Bolt package
......
...@@ -161,6 +161,22 @@ else ...@@ -161,6 +161,22 @@ else
fi fi
AC_MSG_RESULT(Bolt log level is $BOLT_LEVEL.) AC_MSG_RESULT(Bolt log level is $BOLT_LEVEL.)
AC_ARG_ENABLE(
[warning-as-errors],
[AS_HELP_STRING([--disable-warning-as-errors], [Disable dealing with compilation warnings as errors])],
[with_log=$enableval],
[with_log=no])
if test "$with_log" = "no" ; then
AC_SUBST(WARNINGS_AS_ERRORS,yes)
else
AC_SUBST(WARNINGS_AS_ERRORS,no)
fi
case "$WARNINGS_AS_ERRORS" in
yes) AC_MSG_RESULT(Compilation warnings considered as errors.);;
*) AC_MSG_RESULT(Compilation warnings not considered as errors.);;
esac
# Look for ANSITerminal with ocamlfind # Look for ANSITerminal with ocamlfind
AC_ARG_VAR(ANSITerminal_PATH,[Directory where to find the ANSITerminal library if not in a standard location]) AC_ARG_VAR(ANSITerminal_PATH,[Directory where to find the ANSITerminal library if not in a standard location])
...@@ -242,7 +258,7 @@ fi ...@@ -242,7 +258,7 @@ fi
# check if the -w yz option is present # check if the -w yz option is present
# and set the _loc variable of campl4 to loc # and set the _loc variable of campl4 to loc
if ($OCAML $ML_CHECK_FILE -ref 3.09 $OCAML_VERSION > /dev/null) ; then if ($OCAML $ML_CHECK_FILE -ref 3.09 $OCAML_VERSION > /dev/null) ; then
OCAML09WARNINGS="-w yz" OCAML09WARNINGS="-w z"
OCAMLP4_LOC="-loc loc" OCAMLP4_LOC="-loc loc"
AC_MSG_RESULT($OCAMLP4 calls will be done with the $OCAMLP4_LOC option) AC_MSG_RESULT($OCAMLP4 calls will be done with the $OCAMLP4_LOC option)
else else
......
...@@ -591,16 +591,17 @@ OCAMLP4_LOC ...@@ -591,16 +591,17 @@ OCAMLP4_LOC
OCAML09WARNINGS OCAML09WARNINGS
TYPES TYPES
CAMLP4_LIB CAMLP4_LIB
EASY_FORMAT_PATH
BINIOU_INCLUDE
BINIOU_PATH
YOJSON_PATH
OCF_INCLUDE OCF_INCLUDE
OCF_PATH OCF_PATH
YOJSON_PATH
BINIOU_INCLUDE
BINIOU_PATH
EASY_FORMAT_PATH
OCamlCairo2_INCLUDE OCamlCairo2_INCLUDE
OCamlCairo2_PATH OCamlCairo2_PATH
ANSITerminal_INCLUDE ANSITerminal_INCLUDE
ANSITerminal_PATH ANSITerminal_PATH
WARNINGS_AS_ERRORS
BOLT_LEVEL BOLT_LEVEL
BOLT_PP BOLT_PP
BOLT_LIB BOLT_LIB
...@@ -667,6 +668,7 @@ ac_user_opts=' ...@@ -667,6 +668,7 @@ ac_user_opts='
enable_option_checking enable_option_checking
enable_kaputt enable_kaputt
enable_log enable_log
enable_warning_as_errors
' '
ac_precious_vars='build_alias ac_precious_vars='build_alias
host_alias host_alias
...@@ -676,10 +678,10 @@ DYPGENLIB_PATH ...@@ -676,10 +678,10 @@ DYPGENLIB_PATH
BOLTLIB_PATH BOLTLIB_PATH
ANSITerminal_PATH ANSITerminal_PATH
OCamlCairo2_PATH OCamlCairo2_PATH
OCF_PATH EASY_FORMAT_PATH
YOJSON_PATH
BINIOU_PATH BINIOU_PATH
EASY_FORMAT_PATH' YOJSON_PATH
OCF_PATH'
# Initialize some variables set by options. # Initialize some variables set by options.
...@@ -1302,6 +1304,8 @@ Optional Features: ...@@ -1302,6 +1304,8 @@ Optional Features:
--enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
--enable-kaputt Compile with kaputt for unit testing --enable-kaputt Compile with kaputt for unit testing
--enable-log Enable log information to be produced by bolt --enable-log Enable log information to be produced by bolt
--disable-warning-as-errors
Disable dealing with compilation warnings as errors
Some influential environment variables: Some influential environment variables:
DYPGEN_PATH Directory where to find dypgen if not in a standard location DYPGEN_PATH Directory where to find dypgen if not in a standard location
...@@ -1317,14 +1321,14 @@ Some influential environment variables: ...@@ -1317,14 +1321,14 @@ Some influential environment variables:
OCamlCairo2_PATH OCamlCairo2_PATH
Directory where to find the OCaml Cairo bindings if not in a Directory where to find the OCaml Cairo bindings if not in a
standard location standard location
OCF_PATH Directory where to find the ocf library if not in a standard EASY_FORMAT_PATH
location Directory where to find the Yojson library if not in a standard
YOJSON_PATH Directory where to find the Yojson library if not in a standard
location location
BINIOU_PATH Directory where to find the biniou library if not in a standard BINIOU_PATH Directory where to find the biniou library if not in a standard
location location
EASY_FORMAT_PATH YOJSON_PATH Directory where to find the Yojson library if not in a standard
Directory where to find the Yojson library if not in a standard location
OCF_PATH Directory where to find the ocf library if not in a standard
location location
Use these variables to override the choices made by `configure' or to help Use these variables to override the choices made by `configure' or to help
...@@ -2902,6 +2906,28 @@ fi ...@@ -2902,6 +2906,28 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Bolt log level is $BOLT_LEVEL." >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: Bolt log level is $BOLT_LEVEL." >&5
$as_echo "Bolt log level is $BOLT_LEVEL." >&6; } $as_echo "Bolt log level is $BOLT_LEVEL." >&6; }
# Check whether --enable-warning-as-errors was given.
if test "${enable_warning_as_errors+set}" = set; then :
enableval=$enable_warning_as_errors; with_log=$enableval
else
with_log=no
fi
if test "$with_log" = "no" ; then
WARNINGS_AS_ERRORS=yes
else
WARNINGS_AS_ERRORS=no
fi
case "$WARNINGS_AS_ERRORS" in
yes) { $as_echo "$as_me:${as_lineno-$LINENO}: result: Compilation warnings considered as errors." >&5
$as_echo "Compilation warnings considered as errors." >&6; };;
*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: Compilation warnings not considered as errors." >&5
$as_echo "Compilation warnings not considered as errors." >&6; };;
esac
# Look for ANSITerminal with ocamlfind # Look for ANSITerminal with ocamlfind
...@@ -3246,21 +3272,21 @@ if test "$FOUND_LIB" != "no" ; then ...@@ -3246,21 +3272,21 @@ if test "$FOUND_LIB" != "no" ; then
fi fi
# Look for ocf with ocamlfind # Look for Easy-format with ocamlfind
MACRO="A" MACRO="A"
MACRO=$MACRO"C_LIB_CHECKING" MACRO=$MACRO"C_LIB_CHECKING"
NAME=ocf NAME=Easy-format
STD_FOLDER=ocf STD_FOLDER=easy-format
LIB_FILE=ocf LIB_FILE=easy_format
OFIND_NAME=ocf OFIND_NAME=easy-format
OPAM_PACKAGE=ocf OPAM_PACKAGE=easy-format
MOD=Ocf MOD=Easy_format
OPTIONS="" OPTIONS=""
NO_OPTIONAL=true NO_OPTIONAL=true
LIB_PATH=$OCF_PATH LIB_PATH=$EASY_FORMAT_PATH
# test au cas ou un argument obligatoire est manquant # test au cas ou un argument obligatoire est manquant
if test "$NAME" = "" || test "$STD_FOLDER" = "" || test "$OFIND_NAME" = "" || test "$LIB_FILE" = "" || test "$MOD" = "" ; then if test "$NAME" = "" || test "$STD_FOLDER" = "" || test "$OFIND_NAME" = "" || test "$LIB_FILE" = "" || test "$MOD" = "" ; then
...@@ -3290,7 +3316,7 @@ $as_echo_n "checking for optional library : $NAME... " >&6; } ...@@ -3290,7 +3316,7 @@ $as_echo_n "checking for optional library : $NAME... " >&6; }
else else
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "Cannot remove c_check_ocf.ml. Please change its right with chmod 666 c_check_ocf.ml as_fn_error $? "Cannot remove c_check_easy-format.ml. Please change its right with chmod 666 c_check_easy-format.ml
See \`config.log' for more details" "$LINENO" 5; } See \`config.log' for more details" "$LINENO" 5; }
fi fi
fi fi
...@@ -3413,25 +3439,25 @@ $as_echo "The $NAME library is missing." >&6; } ...@@ -3413,25 +3439,25 @@ $as_echo "The $NAME library is missing." >&6; }
if test "$FOUND_LIB" != "no" ; then if test "$FOUND_LIB" != "no" ; then
OCF_INCLUDE=$LIB_INCLUDE EASY_FORMAT_PATH=$LIB_PATH
fi fi
# Look for Yojson with ocamlfind # Look for biniou with ocamlfind
MACRO="A" MACRO="A"
MACRO=$MACRO"C_LIB_CHECKING" MACRO=$MACRO"C_LIB_CHECKING"
NAME=Yojson NAME=Biniou
STD_FOLDER=yojson STD_FOLDER=biniou
LIB_FILE=yojson LIB_FILE=biniou
OFIND_NAME=yojson OFIND_NAME=biniou
OPAM_PACKAGE=yojson OPAM_PACKAGE=biniou
MOD=Yojson MOD=Bi_io
OPTIONS="" OPTIONS=""
NO_OPTIONAL=true NO_OPTIONAL=true
LIB_PATH=$YOJSON_PATH LIB_PATH=$BINIOU_PATH
# test au cas ou un argument obligatoire est manquant # test au cas ou un argument obligatoire est manquant
if test "$NAME" = "" || test "$STD_FOLDER" = "" || test "$OFIND_NAME" = "" || test "$LIB_FILE" = "" || test "$MOD" = "" ; then if test "$NAME" = "" || test "$STD_FOLDER" = "" || test "$OFIND_NAME" = "" || test "$LIB_FILE" = "" || test "$MOD" = "" ; then
...@@ -3461,7 +3487,7 @@ $as_echo_n "checking for optional library : $NAME... " >&6; } ...@@ -3461,7 +3487,7 @@ $as_echo_n "checking for optional library : $NAME... " >&6; }
else else
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "Cannot remove c_check_yojson.ml. Please change its right with chmod 666 c_check_yojson.ml as_fn_error $? "Cannot remove c_check_biniou.ml. Please change its right with chmod 666 c_check_biniou.ml
See \`config.log' for more details" "$LINENO" 5; } See \`config.log' for more details" "$LINENO" 5; }
fi fi
fi fi
...@@ -3584,25 +3610,25 @@ $as_echo "The $NAME library is missing." >&6; } ...@@ -3584,25 +3610,25 @@ $as_echo "The $NAME library is missing." >&6; }
if test "$FOUND_LIB" != "no" ; then if test "$FOUND_LIB" != "no" ; then
YOJSON_PATH=$LIB_PATH BINIOU_INCLUDE=$LIB_INCLUDE
fi fi
# Look for biniou with ocamlfind # Look for Yojson with ocamlfind
MACRO="A" MACRO="A"
MACRO=$MACRO"C_LIB_CHECKING" MACRO=$MACRO"C_LIB_CHECKING"
NAME=Biniou NAME=Yojson
STD_FOLDER=biniou STD_FOLDER=yojson
LIB_FILE=biniou LIB_FILE=yojson
OFIND_NAME=biniou OFIND_NAME=yojson
OPAM_PACKAGE=biniou OPAM_PACKAGE=yojson
MOD=Bi_io MOD=Yojson
OPTIONS="" OPTIONS=""
NO_OPTIONAL=true NO_OPTIONAL=true
LIB_PATH=$BINIOU_PATH LIB_PATH=$YOJSON_PATH
# test au cas ou un argument obligatoire est manquant # test au cas ou un argument obligatoire est manquant
if test "$NAME" = "" || test "$STD_FOLDER" = "" || test "$OFIND_NAME" = "" || test "$LIB_FILE" = "" || test "$MOD" = "" ; then if test "$NAME" = "" || test "$STD_FOLDER" = "" || test "$OFIND_NAME" = "" || test "$LIB_FILE" = "" || test "$MOD" = "" ; then
...@@ -3632,7 +3658,7 @@ $as_echo_n "checking for optional library : $NAME... " >&6; } ...@@ -3632,7 +3658,7 @@ $as_echo_n "checking for optional library : $NAME... " >&6; }
else else
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "Cannot remove c_check_biniou.ml. Please change its right with chmod 666 c_check_biniou.ml as_fn_error $? "Cannot remove c_check_yojson.ml. Please change its right with chmod 666 c_check_yojson.ml
See \`config.log' for more details" "$LINENO" 5; } See \`config.log' for more details" "$LINENO" 5; }
fi fi
fi fi
...@@ -3755,25 +3781,25 @@ $as_echo "The $NAME library is missing." >&6; } ...@@ -3755,25 +3781,25 @@ $as_echo "The $NAME library is missing." >&6; }
if test "$FOUND_LIB" != "no" ; then if test "$FOUND_LIB" != "no" ; then
BINIOU_INCLUDE=$LIB_INCLUDE YOJSON_PATH=$LIB_PATH
fi fi
# Look for Easy-format with ocamlfind # Look for ocf with ocamlfind
MACRO="A" MACRO="A"
MACRO=$MACRO"C_LIB_CHECKING" MACRO=$MACRO"C_LIB_CHECKING"
NAME=Easy-format NAME=ocf
STD_FOLDER=easy-format STD_FOLDER=ocf
LIB_FILE=easy_format LIB_FILE=ocf
OFIND_NAME=easy-format OFIND_NAME=ocf
OPAM_PACKAGE=easy-format OPAM_PACKAGE=ocf
MOD=Easy_format MOD=Ocf
OPTIONS="" OPTIONS=""
NO_OPTIONAL=true NO_OPTIONAL=true
LIB_PATH=$EASY_FORMAT_PATH LIB_PATH=$OCF_PATH
# test au cas ou un argument obligatoire est manquant # test au cas ou un argument obligatoire est manquant
if test "$NAME" = "" || test "$STD_FOLDER" = "" || test "$OFIND_NAME" = "" || test "$LIB_FILE" = "" || test "$MOD" = "" ; then if test "$NAME" = "" || test "$STD_FOLDER" = "" || test "$OFIND_NAME" = "" || test "$LIB_FILE" = "" || test "$MOD" = "" ; then
...@@ -3803,7 +3829,7 @@ $as_echo_n "checking for optional library : $NAME... " >&6; } ...@@ -3803,7 +3829,7 @@ $as_echo_n "checking for optional library : $NAME... " >&6; }
else else
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "Cannot remove c_check_easy-format.ml. Please change its right with chmod 666 c_check_easy-format.ml as_fn_error $? "Cannot remove c_check_ocf.ml. Please change its right with chmod 666 c_check_ocf.ml
See \`config.log' for more details" "$LINENO" 5; } See \`config.log' for more details" "$LINENO" 5; }
fi fi
fi fi
...@@ -3926,13 +3952,10 @@ $as_echo "The $NAME library is missing." >&6; } ...@@ -3926,13 +3952,10 @@ $as_echo "The $NAME library is missing." >&6; }
if test "$FOUND_LIB" != "no" ; then if test "$FOUND_LIB" != "no" ; then
EASY_FORMAT_PATH=$LIB_PATH OCF_INCLUDE=$LIB_INCLUDE
fi fi
# What is the OCAML version ? # What is the OCAML version ?
# we extract Ocaml version number # we extract Ocaml version number
OCAML_VERSION=`$OCAMLC -version` OCAML_VERSION=`$OCAMLC -version`
...@@ -3991,7 +4014,7 @@ fi ...@@ -3991,7 +4014,7 @@ fi
# check if the -w yz option is present # check if the -w yz option is present
# and set the _loc variable of campl4 to loc # and set the _loc variable of campl4 to loc
if ($OCAML $ML_CHECK_FILE -ref 3.09 $OCAML_VERSION > /dev/null) ; then if ($OCAML $ML_CHECK_FILE -ref 3.09 $OCAML_VERSION > /dev/null) ; then
OCAML09WARNINGS="-w yz" OCAML09WARNINGS="-w z"
OCAMLP4_LOC="-loc loc" OCAMLP4_LOC="-loc loc"
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCAMLP4 calls will be done with the $OCAMLP4_LOC option" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCAMLP4 calls will be done with the $OCAMLP4_LOC option" >&5
$as_echo "$OCAMLP4 calls will be done with the $OCAMLP4_LOC option" >&6; } $as_echo "$OCAMLP4 calls will be done with the $OCAMLP4_LOC option" >&6; }
......
...@@ -20,8 +20,14 @@ ...@@ -20,8 +20,14 @@
DEBUGFLAG = -g DEBUGFLAG = -g
OCAMLCPOPT = -p fm OCAMLCPOPT = -p fm
# Remove warnings:
# 58: Missing cmx file
DISABLE_WARNINGS=-58
# All warnings are treated as errors # All warnings are treated as errors
WARNINGS = @OCAML09WARNINGS@ -warn-error A -warn-error -58 WARNINGS = @OCAML09WARNINGS@ -w $(DISABLE_WARNINGS) -warn-error A
COMMONFLAGS= $(WARNINGS) @TYPES@ COMMONFLAGS= $(WARNINGS) @TYPES@
BYTEFLAGS = $(COMMONFLAGS) $(DEBUGFLAG) BYTEFLAGS = $(COMMONFLAGS) $(DEBUGFLAG)
OPTFLAGS = $(COMMONFLAGS) OPTFLAGS = $(COMMONFLAGS)
......
...@@ -64,9 +64,9 @@ struct ...@@ -64,9 +64,9 @@ struct
(* TODO : Replace by an assert within IFDEFDEBUG *) (* TODO : Replace by an assert within IFDEFDEBUG *)
try try
match Symbols.find sym syms with match Symbols.find sym syms with
| Term_declaration (x,id,_,const_type) as t when sym=x-> Lambda.Const id,const_type | Term_declaration (x,id,_,const_type) when sym=x-> Lambda.Const id,const_type
| Term_declaration _ -> failwith "Bug in find_term" (* x should match the symbol *) | Term_declaration _ -> failwith "Bug in find_term" (* x should match the symbol *)
| Term_definition (x,id,_,const_type,_) as t when sym=x-> Lambda.DConst id,const_type | Term_definition (x,id,_,const_type,_) when sym=x-> Lambda.DConst id,const_type
| Term_definition _ -> failwith "Bug in find_term" (* x should match the symbol *) | Term_definition _ -> failwith "Bug in find_term" (* x should match the symbol *)
| _ -> failwith "Bug in find_term" (* x should return a Term, not a type *) | _ -> failwith "Bug in find_term" (* x should return a Term, not a type *)
with with
...@@ -96,7 +96,7 @@ struct ...@@ -96,7 +96,7 @@ struct
let name {name=n} = n let name {name=n} = n
let find_atomic_type s ({types=syms} as sg) = let find_atomic_type s {types=syms} =
(* TODO : Replace by an assert within IFDEFDEBUG *) (* TODO : Replace by an assert within IFDEFDEBUG *)
try try
match Symbols.find s syms with match Symbols.find s syms with
...@@ -380,7 +380,7 @@ struct ...@@ -380,7 +380,7 @@ struct
let t=typecheck t t_type sg in let t=typecheck t t_type sg in
t,t_type t,t_type
let type_of_constant x ({terms=syms} as sg) = let type_of_constant x {terms=syms} =
try try
match Symbols.find x syms with match Symbols.find x syms with
| Term_declaration (s,_,_,ty) when x = s -> ty | Term_declaration (s,_,_,ty) when x = s -> ty
......
...@@ -418,10 +418,10 @@ sig_entries : ...@@ -418,10 +418,10 @@ sig_entries :
term : term :
| LAMBDA0 idents DOT term { | LAMBDA0 idents DOT term {
let sg = get_sig_value dyp.last_local_data in let _sg = get_sig_value dyp.last_local_data in
fun env ws -> reset_location $1 (multiple_abs env ws Abstract_syntax.Linear $2 $4 (fun x -> x))} binder fun env ws -> reset_location $1 (multiple_abs env ws Abstract_syntax.Linear $2 $4 (fun x -> x))} binder
| LAMBDA idents DOT term { | LAMBDA idents DOT term {
let sg = get_sig_value dyp.last_local_data in let _sg = get_sig_value dyp.last_local_data in
fun env ws -> reset_location $1 (multiple_abs env ws Abstract_syntax.Non_linear $2 $4 (fun x -> x))} binder fun env ws -> reset_location $1 (multiple_abs env ws Abstract_syntax.Non_linear $2 $4 (fun x -> x))} binder
| IDENT<b> idents<ids> DOT ...{let sg = get_sig_value dyp.last_local_data in | IDENT<b> idents<ids> DOT ...{let sg = get_sig_value dyp.last_local_data in
let binder,((p1,p2) as l) = b in let binder,((p1,p2) as l) = b in
...@@ -518,7 +518,7 @@ sig_entries : ...@@ -518,7 +518,7 @@ sig_entries :
| exc -> raise exc } | exc -> raise exc }
| comma_ids<ids> COLON_EQUAL ...{ | comma_ids<ids> COLON_EQUAL ...{
let abs,obj = get_abs_and_obj_sig_value dyp.last_local_data in let abs,obj = get_abs_and_obj_sig_value dyp.last_local_data in
let kind = let _kind =
List.fold_left List.fold_left
(fun k (id,loc) -> (fun k (id,loc) ->
match k,fst (Environment.Signature1.is_constant id abs),Environment.Signature1.is_type id abs with match k,fst (Environment.Signature1.is_constant id abs),Environment.Signature1.is_type id abs with
......
...@@ -71,7 +71,7 @@ struct ...@@ -71,7 +71,7 @@ struct
(try (try
let ty_in_env=IntMap.find (env.l_level-i-1) env.lvar_typing in let ty_in_env=IntMap.find (env.l_level-i-1) env.lvar_typing in
LOG "%sAdding an equation (Lvariable found in the environment) %d<-->%d" prefix ty_var ty_in_env LEVEL TRACE ; LOG "%sAdding an equation (Lvariable found in the environment) %d<-->%d" prefix ty_var ty_in_env LEVEL TRACE ;
let new_eq=UF.union ty_var (IntMap.find (env.l_level-i-1) env.lvar_typing) env.type_equations in let new_eq=UF.union ty_var ty_in_env env.type_equations in
ty_var,{env with type_equations=new_eq} ty_var,{env with type_equations=new_eq}
with with
| Not_found -> | Not_found ->
......
...@@ -537,7 +537,7 @@ struct ...@@ -537,7 +537,7 @@ struct
let () = Environment.Signature1.type_to_formatted_string Format.str_formatter ty' obj in let () = Environment.Signature1.type_to_formatted_string Format.str_formatter ty' obj in
let () = Utils.sformat "@]@]@]@." in let () = Utils.sformat "@]@]@]@." in
let () = if first&&svg_output then let () = if first&&svg_output then
let expanded_t = Lambda.Lambda.normalize (Environment.Signature1.expand_term t abs) in let _expanded_t = Lambda.Lambda.normalize (Environment.Signature1.expand_term t abs) in
let d = ShowI.realize_diagram t lexicons !config in let d = ShowI.realize_diagram t lexicons !config in
(* let d = ShowI.realize_diagram expanded_t lexicons in *) (* let d = ShowI.realize_diagram expanded_t lexicons in *)
Diagram.to_svg "realize.svg" d Diagram.to_svg "realize.svg" d
...@@ -612,7 +612,7 @@ struct ...@@ -612,7 +612,7 @@ struct
let parse ?name e data l = let parse ?name e data l =
let lex = get_lex name "parse" e l in let lex = get_lex name "parse" e l in
let abs,obj=Environment.Lexicon.get_sig lex in (* let abs,_=Environment.Lexicon.get_sig lex in *)
match Data_parser.parse_heterogenous_term ~output:false data lex with match Data_parser.parse_heterogenous_term ~output:false data lex with
| None -> () | None -> ()
| Some (obj_t,abs_ty) -> | Some (obj_t,abs_ty) ->
...@@ -634,7 +634,7 @@ struct ...@@ -634,7 +634,7 @@ struct
let query ?name e data l = let query ?name e data l =
let lex = get_lex name "idb" e l in let lex = get_lex name "idb" e l in
let abs,obj=Environment.Lexicon.get_sig lex in (* let _,_=Environment.Lexicon.get_sig lex in *)
match Data_parser.parse_heterogenous_term ~output:false data lex with match Data_parser.pars