From 8e3c1d280015683d5658e019e3a7aa04150c7880 Mon Sep 17 00:00:00 2001 From: Florian Hammerschmidt Date: Fri, 4 Sep 2026 21:30:08 +0200 Subject: [PATCH] Developer playground: Remove the now unused lam tab --- packages/dev-playground/src/Bindings.res | 1 - packages/dev-playground/src/CompilerApi.res | 6 ++---- packages/dev-playground/src/CompilerApi.resi | 1 - packages/dev-playground/src/Main.res | 7 ++----- 4 files changed, 4 insertions(+), 11 deletions(-) diff --git a/packages/dev-playground/src/Bindings.res b/packages/dev-playground/src/Bindings.res index b20bb78dae0..520bdd5a7d1 100644 --- a/packages/dev-playground/src/Bindings.res +++ b/packages/dev-playground/src/Bindings.res @@ -80,7 +80,6 @@ module CompileResult = { @get external parsetree: compileResult => option = "parsetree" @get external typedtree: compileResult => option = "typedtree" @get external lambda: compileResult => option = "lambda" - @get external lam: compileResult => option = "lam" @get external gentype: compileResult => option = "gentype" @get external sourceMap: compileResult => option = "source_map" @get external errors: compileResult => option> = "errors" diff --git a/packages/dev-playground/src/CompilerApi.res b/packages/dev-playground/src/CompilerApi.res index 6b3bec25584..b9f232dcc4b 100644 --- a/packages/dev-playground/src/CompilerApi.res +++ b/packages/dev-playground/src/CompilerApi.res @@ -62,7 +62,6 @@ type success = { parsetree: string, typedtree: string, lambda: string, - lam: string, gentype: option, sourceMap: option, warnings: array, @@ -403,9 +402,8 @@ let normalize = (compileOutput, elapsedMs): compileResult => { compileOutput->CompileResult.parsetree, compileOutput->CompileResult.typedtree, compileOutput->CompileResult.lambda, - compileOutput->CompileResult.lam, ) { - | (Some(parsetree), Some(typedtree), Some(lambda), Some(lam)) => + | (Some(parsetree), Some(typedtree), Some(lambda)) => let warnings = switch compileOutput->CompileResult.warnings { | Some(warnings) => warnings->Array.map(warningToText) | None => [] @@ -419,7 +417,7 @@ let normalize = (compileOutput, elapsedMs): compileResult => { let gentype = compileOutput->CompileResult.gentype let sourceMap = compileOutput->CompileResult.sourceMap - Ok({jsCode, parsetree, typedtree, lambda, lam, gentype, sourceMap, warnings, time: elapsedMs}) + Ok({jsCode, parsetree, typedtree, lambda, gentype, sourceMap, warnings, time: elapsedMs}) | _ => Error(failureFromCompileOutput(compileOutput, elapsedMs)) } diff --git a/packages/dev-playground/src/CompilerApi.resi b/packages/dev-playground/src/CompilerApi.resi index 6271924b2c5..5535d15e04d 100644 --- a/packages/dev-playground/src/CompilerApi.resi +++ b/packages/dev-playground/src/CompilerApi.resi @@ -25,7 +25,6 @@ type success = { parsetree: string, typedtree: string, lambda: string, - lam: string, gentype: option, sourceMap: option, warnings: array, diff --git a/packages/dev-playground/src/Main.res b/packages/dev-playground/src/Main.res index d2fae2b3e3e..8790964b828 100644 --- a/packages/dev-playground/src/Main.res +++ b/packages/dev-playground/src/Main.res @@ -4,7 +4,6 @@ type tab = | Parsetree | Typedtree | Lambda - | Lam | JavaScript | GenType | SourceMap @@ -26,7 +25,7 @@ type compileSnapshot = { result: CompilerApi.compileResult, } -let baseTabs: array = [Parsetree, Typedtree, Lambda, Lam, JavaScript] +let baseTabs: array = [Parsetree, Typedtree, Lambda, JavaScript] let moduleSystems: array = [Esmodule, Commonjs] let sourceMapModes: array = [Disabled, Linked, Inline, Hidden] @@ -34,7 +33,7 @@ let tabIsVisible = (config: PlaygroundConfig.t, tab) => switch tab { | GenType => config.gentypeEnabled | SourceMap => config.sourceMapMode !== Disabled - | Parsetree | Typedtree | Lambda | Lam | JavaScript | Settings => true + | Parsetree | Typedtree | Lambda | JavaScript | Settings => true } let tabsForConfig = (config: PlaygroundConfig.t) => { @@ -63,7 +62,6 @@ let tabLabel = tab => | Parsetree => "parsetree" | Typedtree => "typedtree" | Lambda => "lambda" - | Lam => "lam" | JavaScript => "js" | GenType => "gentype" | SourceMap => "source map" @@ -225,7 +223,6 @@ let selectedOutput = (snapshot: option, activeTab: tab) => | Parsetree => result.parsetree | Typedtree => result.typedtree | Lambda => result.lambda - | Lam => result.lam | JavaScript => result.jsCode | GenType => optionalOutput(result.gentype, "This compiler bundle does not expose gentype output yet.")