A human-friendly DSL for ATProto Lexicons
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix std a bit

+14 -14
+6 -6
mlf-wasm/src/lib.rs
··· 62 62 }; 63 63 64 64 // Create workspace and validate 65 - let mut workspace = match mlf_lang::Workspace::with_prelude() { 65 + let mut workspace = match mlf_lang::Workspace::with_std() { 66 66 Ok(ws) => ws, 67 67 Err(e) => { 68 - errors.push(format!("Failed to load prelude: {:?}", e)); 68 + errors.push(format!("Failed to load standard library: {:?}", e)); 69 69 let result = CheckResult { 70 70 success: false, 71 71 errors, ··· 106 106 } 107 107 }; 108 108 109 - // Create workspace with prelude for type resolution 110 - let mut workspace = match mlf_lang::Workspace::with_prelude() { 109 + // Create workspace with standard library for type resolution 110 + let mut workspace = match mlf_lang::Workspace::with_std() { 111 111 Ok(ws) => ws, 112 112 Err(e) => { 113 113 let result = GenerateResult { 114 114 success: false, 115 115 lexicon: None, 116 - error: Some(format!("Failed to load prelude: {:?}", e)), 116 + error: Some(format!("Failed to load standard library: {:?}", e)), 117 117 }; 118 118 return serde_wasm_bindgen::to_value(&result).unwrap(); 119 119 } ··· 129 129 return serde_wasm_bindgen::to_value(&result).unwrap(); 130 130 } 131 131 132 - // Resolve types (expands inline types from prelude) 132 + // Resolve types (expands inline types from standard library) 133 133 if let Err(e) = workspace.resolve() { 134 134 let result = GenerateResult { 135 135 success: false,
+7 -7
std/com/atproto/moderation/defs.mlf
··· 2 2 3 3 def type reasonType = string constrained { 4 4 knownValues: [ 5 - "com.atproto.moderation.defs#reasonSpam", 6 - "com.atproto.moderation.defs#reasonViolation", 7 - "com.atproto.moderation.defs#reasonMisleading", 8 - "com.atproto.moderation.defs#reasonSexual", 9 - "com.atproto.moderation.defs#reasonRude", 10 - "com.atproto.moderation.defs#reasonOther", 11 - "com.atproto.moderation.defs#reasonAppeal", 5 + reasonSpam, 6 + reasonViolation, 7 + reasonMisleading, 8 + reasonSexual, 9 + reasonRude, 10 + reasonOther, 11 + reasonAppeal, 12 12 "tools.ozone.report.defs#reasonAppeal", 13 13 "tools.ozone.report.defs#reasonViolenceAnimalWelfare", 14 14 "tools.ozone.report.defs#reasonViolenceThreats",
+1 -1
std/com/atproto/repo/strongRef.mlf
··· 1 1 // com.atproto.repo.strongRef 2 2 // A URI with a content-hash fingerprint. 3 3 4 - inline type strongRef = { 4 + def type strongRef = { 5 5 uri: AtUri, 6 6 cid: Cid, 7 7 };