caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Christophe Raffalli <christophe@raffalli.eu>
To: caml-list@inria.fr
Subject: Re: [Caml-list] functor inlining
Date: Thu, 14 Jan 2021 12:41:00 -0900	[thread overview]
Message-ID: <YAC6bHBlDqxDYTMb@oulala> (raw)
In-Reply-To: <YAC4QvjWl/LVMtsw@oulala>

[-- Attachment #1: Type: text/plain, Size: 1012 bytes --]

Le 21-01-14 12:31:46, Christophe Raffalli a écrit :
>
> Hello
>
> I try to inline some module application. It works when
> I compile with ocamlopt or ocamlc manually:
>
> ocamlopt -w a -warn-error a mat.ml test.ml
>
> But fails using dune:
>
> dune build

Found the problem: dune is compiling with -opaque ... but could
not find yet how to remove this option!

> gives this error without flambda:
>
> File "test.ml", line 12, characters 18-52:
> 12 | module FloatMat = Mat.Make [@inlined always] (Float)
>                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> Error (warning 55): Cannot inline: Unknown function
>
> and this error with flambda:
>
> File "test.ml", line 12, characters 18-52:
> 12 | module FloatMat = Mat.Make [@inlined always] (Float)
>                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> Error (warning 55): Cannot inline: [@inlined] attribute was not used on this function application (the optimizer did not know what function was being applied)
>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2021-01-14 21:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-14 21:31 Christophe Raffalli
2021-01-14 21:41 ` Christophe Raffalli [this message]
2021-01-15  3:57   ` Christophe Raffalli
2021-01-15  7:43     ` Nicolás Ojeda Bär
2021-01-15 17:05       ` Christophe Raffalli

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=YAC6bHBlDqxDYTMb@oulala \
    --to=christophe@raffalli.eu \
    --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;
as well as URLs for NNTP newsgroup(s).