diff --git a/mlf-wasm/src/lib.rs b/mlf-wasm/src/lib.rs index 35e42fb..56200be 100644 --- a/mlf-wasm/src/lib.rs +++ b/mlf-wasm/src/lib.rs @@ -62,10 +62,10 @@ pub fn check(source: &str) -> JsValue { }; // Create workspace and validate - let mut workspace = match mlf_lang::Workspace::with_prelude() { + let mut workspace = match mlf_lang::Workspace::with_std() { Ok(ws) => ws, Err(e) => { - errors.push(format!("Failed to load prelude: {:?}", e)); + errors.push(format!("Failed to load standard library: {:?}", e)); let result = CheckResult { success: false, errors, @@ -106,14 +106,14 @@ pub fn generate_lexicon(source: &str, namespace: &str) -> JsValue { } }; - // Create workspace with prelude for type resolution - let mut workspace = match mlf_lang::Workspace::with_prelude() { + // Create workspace with standard library for type resolution + let mut workspace = match mlf_lang::Workspace::with_std() { Ok(ws) => ws, Err(e) => { let result = GenerateResult { success: false, lexicon: None, - error: Some(format!("Failed to load prelude: {:?}", e)), + error: Some(format!("Failed to load standard library: {:?}", e)), }; return serde_wasm_bindgen::to_value(&result).unwrap(); } @@ -129,7 +129,7 @@ pub fn generate_lexicon(source: &str, namespace: &str) -> JsValue { return serde_wasm_bindgen::to_value(&result).unwrap(); } - // Resolve types (expands inline types from prelude) + // Resolve types (expands inline types from standard library) if let Err(e) = workspace.resolve() { let result = GenerateResult { success: false, diff --git a/std/com/atproto/moderation/defs.mlf b/std/com/atproto/moderation/defs.mlf index 339ab08..b6e6030 100644 --- a/std/com/atproto/moderation/defs.mlf +++ b/std/com/atproto/moderation/defs.mlf @@ -2,13 +2,13 @@ def type reasonType = string constrained { knownValues: [ - "com.atproto.moderation.defs#reasonSpam", - "com.atproto.moderation.defs#reasonViolation", - "com.atproto.moderation.defs#reasonMisleading", - "com.atproto.moderation.defs#reasonSexual", - "com.atproto.moderation.defs#reasonRude", - "com.atproto.moderation.defs#reasonOther", - "com.atproto.moderation.defs#reasonAppeal", + reasonSpam, + reasonViolation, + reasonMisleading, + reasonSexual, + reasonRude, + reasonOther, + reasonAppeal, "tools.ozone.report.defs#reasonAppeal", "tools.ozone.report.defs#reasonViolenceAnimalWelfare", "tools.ozone.report.defs#reasonViolenceThreats", diff --git a/std/com/atproto/repo/strongRef.mlf b/std/com/atproto/repo/strongRef.mlf index d09ad65..617954a 100644 --- a/std/com/atproto/repo/strongRef.mlf +++ b/std/com/atproto/repo/strongRef.mlf @@ -1,7 +1,7 @@ // com.atproto.repo.strongRef // A URI with a content-hash fingerprint. -inline type strongRef = { +def type strongRef = { uri: AtUri, cid: Cid, };