diff --git a/lib/resolve.ml b/lib/resolve.ml index 51c37abb..7344e5f1 100644 --- a/lib/resolve.ml +++ b/lib/resolve.ml @@ -64,6 +64,7 @@ let create_context () : context = (* Numeric coercions and math *) def "int"; def "float"; def "sqrt"; def "cbrt"; def "pow_float"; def "floor"; def "ceil"; def "round"; + def "trunc"; def "abs"; def "max"; def "min"; def "sin"; def "cos"; def "tan"; def "atan"; def "atan2"; def "exp"; def "log"; def "log10"; def "log2"; diff --git a/stdlib/io.affine b/stdlib/io.affine index 307feb60..b71ad3ae 100644 --- a/stdlib/io.affine +++ b/stdlib/io.affine @@ -20,6 +20,9 @@ // show(value) -> String // time_now() -> Float (CPU time in seconds) +// Cross-module imports (ADR-011: explicit `use module::{...}`) +use string::{ split }; + // ============================================================================ // Console Output // ============================================================================ diff --git a/stdlib/string.affine b/stdlib/string.affine index 06976be6..e3235625 100644 --- a/stdlib/string.affine +++ b/stdlib/string.affine @@ -116,7 +116,7 @@ fn repeat(s: String, n: Int) -> String { } /// Split string by a delimiter -fn split(s: String, delimiter: String) -> [String] { +pub fn split(s: String, delimiter: String) -> [String] { let slen = len(s); let dlen = len(delimiter);