Cross-module access to plain functions/consts is unsupported #4

Closed
opened 2026-06-15 14:09:38 +02:00 by st · 1 comment
Owner

Repro

use std/Math
fn main(): f64 = Math.pi        // codegen: qualified Math::pi
// and:  Math.sin(1.0)          // codegen: unsupported call

Error: codegen: qualified Math::pi (const) / codegen: unsupported call (fn).

Cross-module interface dispatch works (e.g. Show.show, prelude Int.mod); only plain module-qualified consts/functions fail.

Codegen: Ir.Ref (Ir.Qualified …) (codegen.ml ~867) and the call path (~921).

Repro ``` use std/Math fn main(): f64 = Math.pi // codegen: qualified Math::pi // and: Math.sin(1.0) // codegen: unsupported call ``` Error: codegen: qualified Math::pi (const) / codegen: unsupported call (fn). Cross-module interface dispatch works (e.g. Show.show, prelude Int.mod); only plain module-qualified consts/functions fail. Codegen: Ir.Ref (Ir.Qualified …) (codegen.ml ~867) and the call path (~921).
Author
Owner

Fixed by 3f2aa7d8e5

Fixed by [3f2aa7d8e5](https://forge.haug.codes/st/amelie/commit/3f2aa7d8e524c70c3f3d7ad675855ce686a6ae3b)
st closed this issue 2026-06-15 21:23:51 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
st/amelie#4
No description provided.