From: Hannu Niemistö Date: Tue, 13 Sep 2016 14:26:45 +0000 (+0300) Subject: Merge "Small SCL changes" X-Git-Tag: v1.25.0~122 X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=commitdiff_plain;h=5534d5c906705a5a3038938dbdf9132e6088524a;hp=e920139ff380fac89d7fee28bfa977c5a4116f2c Merge "Small SCL changes" --- diff --git a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/internal/elaboration/subsumption/SubSolver.java b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/internal/elaboration/subsumption/SubSolver.java index 70adf524b..f9b5efc3b 100644 --- a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/internal/elaboration/subsumption/SubSolver.java +++ b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/internal/elaboration/subsumption/SubSolver.java @@ -49,7 +49,7 @@ public class SubSolver { reduceChains(); propagateUpperBounds(); checkLowerBounds(); - errorFromUnsolvedEquations(); + //errorFromUnsolvedEquations(); //System.out.println("--"); //print(); } diff --git a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/top/ExpressionEvaluator.java b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/top/ExpressionEvaluator.java index 5c8f59bb2..39f0ac721 100644 --- a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/top/ExpressionEvaluator.java +++ b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/top/ExpressionEvaluator.java @@ -182,7 +182,7 @@ public class ExpressionEvaluator { final Environment environment = runtimeEnvironment.getEnvironment(); // Parse expression - if(expressionText != null) { + if(expressionText != null && !expressionText.trim().isEmpty()) { try { switch(parseMode) { case BLOCK: { diff --git a/bundles/org.simantics.scl.runtime/scl/Prelude.scl b/bundles/org.simantics.scl.runtime/scl/Prelude.scl index b29b04a2f..84f8b91b6 100644 --- a/bundles/org.simantics.scl.runtime/scl/Prelude.scl +++ b/bundles/org.simantics.scl.runtime/scl/Prelude.scl @@ -1266,7 +1266,7 @@ instance MonadZero Maybe where mzero = Nothing instance MonadOr Maybe where - morelse (Just a) _ = Just a + morelse a@(Just _) _ = a morelse _ b = b "`execJust v f` executes the function `f` with parameter value `x`, if `v=Just x`. If `v=Nothing`, the function does nothing." diff --git a/bundles/org.simantics.scl.runtime/scl/StandardLibrary.scl b/bundles/org.simantics.scl.runtime/scl/StandardLibrary.scl index 6b43166e3..76ecece9c 100644 --- a/bundles/org.simantics.scl.runtime/scl/StandardLibrary.scl +++ b/bundles/org.simantics.scl.runtime/scl/StandardLibrary.scl @@ -15,7 +15,7 @@ include "MSet" as MSet include "MList" as MList include "MMultiMap" as MMultiMap include "Coercion" -include "Json2" +//include "Json2" include "IterN" as Extra