Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

camlp4 et le toplevel (3.07beta1) #8222

Closed
vicuna opened this issue Jul 24, 2003 · 2 comments
Closed

camlp4 et le toplevel (3.07beta1) #8222

vicuna opened this issue Jul 24, 2003 · 2 comments
Labels

Comments

@vicuna
Copy link

vicuna commented Jul 24, 2003

Original bug ID: 1770
Reporter: administrator
Status: closed
Resolution: fixed
Priority: normal
Severity: minor
Category: ~DO NOT USE (was: OCaml general)

Bug description

Bonjour,

un #load "camlp4o.cma" ne semble plus marcher avec le toplevel de la
beta 3.07 :

,----
| $ /usr/akasha/ocaml/bin/ocaml
| Objective Caml version 3.07+beta 1
|
| # #load "camlp4o.cma" ;;
| Cannot find file camlp4o.cma.
`----

alors que :

,----
| $ ocaml
| Objective Caml version 3.06
|
| # #load "camlp4o.cma" ;;
| Camlp4 Parsing version 3.06
`----

par contre, ça marche en mettant le .cma sur la ligne de commande :

,----
| $ /usr/akasha/ocaml/bin/ocaml camlp4o.cma
| Objective Caml version 3.07+beta 1
|
| Camlp4 Parsing version 3.07+beta 1
`----

Par ailleurs, dans le message d'aide du toplevel, à propos des flags
de warning, il est dit default setting is "Ale"', mais il n'y a pas de L/l' dans la liste de flags au-dessus.

--
Olivier

@vicuna
Copy link
Author

vicuna commented Jul 25, 2003

Comment author: administrator

un #load "camlp4o.cma" ne semble plus marcher avec le toplevel de la
beta 3.07 :

En effet, à cause d'une erreur d'initialisation du chemin de
recherche, il faut faire #directory "+camlp4" avant.
J'ai corrigé l'erreur dans les sources de travail. Un patch
par-rapport à 3.07 beta 1 est ci-dessous.

Par ailleurs, dans le message d'aide du toplevel, à propos des flags
de warning, il est dit default setting is "Ale"', mais il n'y a pas de L/l' dans la liste de flags au-dessus.

Ça sera corrigé aussi.

  • Xavier Leroy

Index: driver/compile.ml

RCS file: /net/pauillac/caml/repository/csl/driver/compile.ml,v
retrieving revision 1.52
retrieving revision 1.53
diff -c -r1.52 -r1.53
*** driver/compile.ml 17 Jul 2003 08:38:27 -0000 1.52
--- driver/compile.ml 25 Jul 2003 12:17:18 -0000 1.53


*** 10,16 ****
(* *)
(***********************************************************************)

! (* $Id: compile.ml,v 1.52 2003/07/17 08:38:27 xleroy Exp $ *)

(* The batch compiler *)

--- 10,16 ----
(* *)
(***********************************************************************)

! (* $Id: compile.ml,v 1.53 2003/07/25 12:17:18 xleroy Exp $ *)

(* The batch compiler *)


*** 37,44 ****

(* Return the initial environment in which compilation proceeds. *)

let initial_env () =

  • init_path();
    Ident.reinit();
    try
    if !Clflags.nopervasives
    --- 37,45 ----

(* Return the initial environment in which compilation proceeds. *)

  • (* Note: do not do init_path() in initial_env, this breaks
  • toplevel initialization (pre-release (3.07 beta 1) #8227) *)
    let initial_env () =
    Ident.reinit();
    try
    if !Clflags.nopervasives

*** 50,55 ****
--- 51,57 ----
(* Compile a .mli file *)

let interface ppf sourcefile =

  • init_path();
    let prefixname = chop_extension_if_any sourcefile in
    let modulename = String.capitalize(Filename.basename prefixname) in
    let inputfile = Pparse.preprocess sourcefile in

*** 78,83 ****
--- 80,86 ----
let (++) x f = f x

let implementation ppf sourcefile =

  • init_path();
    let prefixname = chop_extension_if_any sourcefile in
    let modulename = String.capitalize(Filename.basename prefixname) in
    let inputfile = Pparse.preprocess sourcefile in
    Index: driver/optcompile.ml
    ===================================================================
    RCS file: /net/pauillac/caml/repository/csl/driver/optcompile.ml,v
    retrieving revision 1.46
    retrieving revision 1.47
    diff -c -r1.46 -r1.47
    *** driver/optcompile.ml 17 Jul 2003 08:38:27 -0000 1.46
    --- driver/optcompile.ml 25 Jul 2003 12:17:19 -0000 1.47

*** 10,16 ****
(* *)
(***********************************************************************)

! (* $Id: optcompile.ml,v 1.46 2003/07/17 08:38:27 xleroy Exp $ *)

(* The batch compiler *)

--- 10,16 ----
(* *)
(***********************************************************************)

! (* $Id: optcompile.ml,v 1.47 2003/07/25 12:17:19 xleroy Exp $ *)

(* The batch compiler *)


*** 37,43 ****
(* Return the initial environment in which compilation proceeds. *)

let initial_env () =

  • init_path();
    Ident.reinit();
    try
    if !Clflags.nopervasives
    --- 37,42 ----

*** 49,54 ****
--- 48,54 ----
(* Compile a .mli file *)

let interface ppf sourcefile =

  • init_path();
    let prefixname = Misc.chop_extension_if_any sourcefile in
    let modulename = String.capitalize(Filename.basename prefixname) in
    let inputfile = Pparse.preprocess sourcefile in

*** 78,83 ****
--- 78,84 ----
let (+++) (x, y) f = (x, f y)

let implementation ppf sourcefile =

  • init_path();
    let prefixname = Misc.chop_extension_if_any sourcefile in
    let modulename = String.capitalize(Filename.basename prefixname) in
    let inputfile = Pparse.preprocess sourcefile in

@vicuna
Copy link
Author

vicuna commented Jul 29, 2003

Comment author: administrator

Fixed 2003-07-25 by XL

@vicuna vicuna closed this as completed Jul 29, 2003
@vicuna vicuna added the bug label Mar 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant