From: Miro Richard Eklund Date: Tue, 20 Mar 2018 14:55:48 +0000 (+0200) Subject: Minor updates to Document/All.scl and Prelude.scl X-Git-Tag: v1.43.0~136^2~533 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=66e653e6290c87c1ea8cd1dbc2bacdaaff1065f5;p=simantics%2Fplatform.git Minor updates to Document/All.scl and Prelude.scl "show" is able to type cast a ByteArray without the additional specification in Prelude.scl. Show is unable to be used on ByteArrays if Prelude.scl contains an implementation for it, as "show" cannot determine which implementation to use: the general, or the ByteArray specific. Thus, ByteArray has been removed from Prelude. getTuples returns a list of tuples that can be of any format: they do not necessarily have to all be the same. As a result, [a] specification doesn't correctly reflect the data that can be fetched with getTuples, but [Dynamic] does. refs #7830 refs #7831 Change-Id: Ib9912e9479838df2c8d32c621936e8fdecef2d7b --- diff --git a/bundles/org.simantics.document.server/scl/Document/All.scl b/bundles/org.simantics.document.server/scl/Document/All.scl index 641f4fdc1..4db639f5b 100644 --- a/bundles/org.simantics.document.server/scl/Document/All.scl +++ b/bundles/org.simantics.document.server/scl/Document/All.scl @@ -102,7 +102,7 @@ importJava "org.simantics.document.server.Functions" where putTuple :: CommandContextMutable -> String -> a -> CommandContextMutable @JavaName getTuples - getTuples :: CommandContext -> String -> [a] + getTuples :: CommandContext -> String -> [Dynamic] printContext :: CommandContext -> String diff --git a/bundles/org.simantics.scl.runtime/scl/Prelude.scl b/bundles/org.simantics.scl.runtime/scl/Prelude.scl index 2be6ed745..d5d278828 100644 --- a/bundles/org.simantics.scl.runtime/scl/Prelude.scl +++ b/bundles/org.simantics.scl.runtime/scl/Prelude.scl @@ -2288,16 +2288,6 @@ instance Show TypeRep where isSpecialType (TApply a _) = isSpecialType a */ -// ByteArray - -importJava "java.util.Arrays" where - @private - @JavaName toString - byteArrayToString :: ByteArray -> String - -instance Show ByteArray where - show = byteArrayToString - // Type @private