[m-users.] C target compiler error (.mih file not updated)
Volker Wysk
post at volker-wysk.de
Mon Jan 26 02:29:56 AEDT 2026
Hi again
Btw, here's a list of Mercury documentation, including some for newbies:
https://volker-wysk.de/mercury/resources.html#documentation
Cheers,
Volker
Am Sonntag, dem 25.01.2026 um 12:58 +0000 schrieb Flo:
> Hi, I'm new to Mercury, coming from a background in functional programming
> (Haskell, OCaml, Agda).
> I'm currently making my way through the reference manual and studying the
> library code.
>
> I'm writing to comment on a puzzle I had this morning when compiling a
> little test.
>
> I wrote a first module m1, I compiled it with `mmc --make m1.m`,
> this generated a `m1.mih` file.
>
> Then I modified m1, then created a module m2 which imports m1, and
> compiled m2 with `mmc --make m2`.
> The `m1.mih` file was not updated in this process, despite the fact that
> `m1.m`'s interface had changed.
> and as a result, the C compiler complained about conflicting types.
>
> I consider this to be problematic: ideally any error should be caught by
> the Mercury compiler.
> If compilation succeeds, the target code it generates should be then
> compile without errors using the corresponding target compilers.
>
> why wasn't `m1.mih` updated? in fact it's not even needed: when I deleted
> it, and ran `mmc --make m2` again,
> that file wasn't even produced. It seems to be produced only when I
> compile with `mmc --make m1.m`.
> _______________________________________________
> users mailing list
> users at lists.mercurylang.org
> https://lists.mercurylang.org/listinfo/users
More information about the users
mailing list