E4070

E4070#

Unknown intrinsic. This intrinsic is not known to the MoonBit compiler.

This error applies to a direct intrinsic declaration (fn ... = "name"), which has no ordinary function body to fall back to. An unknown name in a #intrinsic("name") attribute instead produces warning E0094: the attribute is ignored and the ordinary function body is used.

Intrinsics are not intended for usage outside of moonbitlang/core. They are subject to change without notice, and we highly recommend against using them.

Erroneous example#

///|
pub fn my_abort(message : String) -> Unit = "%not_a_real_intrinsic"
// Error: Unknown intrinsic: %not_a_real_intrinsic

Suggestion#

You probably want to use the abort function from moonbitlang/core:

///|
pub fn my_abort(message : String) -> Unit {
  abort(message)
}

If you really need to use the intrinsic, you can check the source code of moonbitlang/core for further usage of the corresponding intrinsic.