arc-lang 0.6.11 → 0.6.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -27,6 +27,13 @@ class Env {
27
27
  suggestion: "Did you mean 'let mut' to declare a mutable variable?",
28
28
  });
29
29
  }
30
+ if (name === "import") {
31
+ throw new ArcRuntimeError(`Undefined variable: ${name}`, {
32
+ code: ErrorCode.UNDEFINED_VARIABLE,
33
+ category: "RuntimeError",
34
+ suggestion: "Arc uses 'use' instead of 'import'. Try: use modulename",
35
+ });
36
+ }
30
37
  const candidates = this.allNames();
31
38
  const closest = findClosestMatch(name, candidates);
32
39
  throw new ArcRuntimeError(`Undefined variable: ${name}`, {
package/dist/version.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export declare const ARC_VERSION = "0.6.9";
1
+ export declare const ARC_VERSION = "0.6.13";
2
2
  export declare const ARC_BUILD_DATE: string;
3
3
  export declare const ARC_PLATFORM: string;
4
4
  /** Print version info */
package/dist/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // Arc Version System
2
- export const ARC_VERSION = "0.6.9";
2
+ export const ARC_VERSION = "0.6.13";
3
3
  export const ARC_BUILD_DATE = new Date().toISOString().split("T")[0];
4
4
  export const ARC_PLATFORM = `${process.platform}-${process.arch}`;
5
5
  /** Print version info */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "arc-lang",
3
- "version": "0.6.11",
3
+ "version": "0.6.13",
4
4
  "description": "Arc ⚡ — A programming language designed by AI agents, for AI agents. 27-63% fewer tokens than JavaScript.",
5
5
  "type": "module",
6
6
  "bin": {
package/stdlib/MODULES.md CHANGED
@@ -781,21 +781,17 @@ stdlib/
781
781
  └── cmd/ # Command execution
782
782
  ```
783
783
 
784
- ### Import Syntax
784
+ ### Use Syntax
785
785
 
786
786
  ```arc
787
- // Import entire module
788
- import collections
787
+ // Use entire module
788
+ use collections
789
789
 
790
- // Import specific exports
791
- import {List, Map, Set} from collections
790
+ // Use specific exports
791
+ use collections { List, Map, Set }
792
792
 
793
- // Import with alias
794
- import collections as col
795
- import {List as L} from collections
796
-
797
- // Import everything (discouraged)
798
- import * from collections
793
+ // Use everything (discouraged)
794
+ use collections { * }
799
795
  ```
800
796
 
801
797
  ---
package/stdlib/README.md CHANGED
@@ -40,7 +40,7 @@ strings.capitalize("hello") # => "Hello"
40
40
  strings.words("one two three") # => ["one", "two", "three"]
41
41
  ```
42
42
 
43
- ## Built-in Functions (No Import)
43
+ ## Built-in Functions (No `use` Required)
44
44
 
45
45
  Many common operations are built into Arc and need no `use` statement:
46
46