]> gerrit.simantics Code Review - simantics/platform.git/commitdiff
Small SCL changes 58/58/1
authorHannu Niemistö <hannu.niemisto@semantum.fi>
Tue, 13 Sep 2016 13:49:01 +0000 (16:49 +0300)
committerHannu Niemistö <hannu.niemisto@semantum.fi>
Tue, 13 Sep 2016 13:49:01 +0000 (16:49 +0300)
Removed error message from subsumption constraints that
cannot be simplified away, because the simplification is not
working correctly in certain standard cases.

Removed Json2 from StandardLibrary

Small efficiency fix in Prelude

Check if the input block expression is empty in ExpressionEvalutor.

Change-Id: I1b1843cb7847886618aea5063aff53fef35814cb

bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/internal/elaboration/subsumption/SubSolver.java
bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/top/ExpressionEvaluator.java
bundles/org.simantics.scl.runtime/scl/Prelude.scl
bundles/org.simantics.scl.runtime/scl/StandardLibrary.scl

index 70adf524b501592229f21d1f8ed201149f9f7e72..f9b5efc3bd3eb7eb3e68dc148f9f4d0496648a3f 100644 (file)
@@ -49,7 +49,7 @@ public class SubSolver {
         reduceChains();\r
         propagateUpperBounds();\r
         checkLowerBounds();\r
-        errorFromUnsolvedEquations();\r
+        //errorFromUnsolvedEquations();\r
         //System.out.println("--");\r
         //print();\r
     }\r
index 5c8f59bb2dcee005fc5c006f72c4f453fa987990..39f0ac721ee2a2bd32d366a9e17123e6c9ab6e74 100644 (file)
@@ -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: {
index b29b04a2fe42025c1538637f10080c921e4bf12f..84f8b91b6ef97751ea1f0a00b053ece6e2e8be63 100644 (file)
@@ -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."
index 6b43166e3d34a355802ba00da2df0f1f457f36de..76ecece9c5b3e59ce39c63d766d16b0836bcccb2 100644 (file)
@@ -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