From: Timothy Bourke <Timothy.Bourke@inria.fr>
To: caml-list@inria.fr
Subject: [Caml-list] ocamlc 4.03 -> 4.04: change in meaning of -i
Date: Sat, 8 Jul 2017 16:08:10 +0200 [thread overview]
Message-ID: <20170708140810.vpglvvttlfbflus4@xocuter.home> (raw)
[-- Attachment #1: Type: text/plain, Size: 1086 bytes --]
I just noticed a change in the behaviour of ocamlc that adversely
affects a tool I maintain.
In 4.03.0 (and earlier), the -i option only applies to the .ml files
that follow it on the command line.
In 4.04.0 (and later), the -i option applies to all .ml files on the
command line.
Is this change in behaviour intentional?
Tim.
Longer explanation
==================
Given two files.
a.ml:
let f x = x + 1
b.ml:
open A
let g x = f x
1. In 4.03.0 (and earlier), typing either
ocamlc a.ml -i b.ml
or
ocamlc -c a.ml; ocamlc a.ml -i b.ml
prints
val g : int -> int
and generates
a.cmi
a.cmo
2. In 4.04.0 (and later), typing
ocamlc a.ml -i b.ml
prints
val f : int -> int
File "b.ml", line 1, characters 5-6:
Error: Unbound module A
and does not generate anything.
3. In 4.04.0 (and later), typing
ocamlc -c a.ml; ocamlc a.ml -i b.ml
prints
val f : int -> int
val g : int -> int
and generates
a.cmi
a.cmo
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next reply other threads:[~2017-07-08 14:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-08 14:08 Timothy Bourke [this message]
2017-07-09 9:47 ` David Allsopp
2017-07-09 15:00 ` Timothy Bourke
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170708140810.vpglvvttlfbflus4@xocuter.home \
--to=timothy.bourke@inria.fr \
--cc=caml-list@inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox