From: Hannu Niemistö Date: Thu, 22 Mar 2018 19:33:17 +0000 (+0200) Subject: Show instance for SafeDynamic X-Git-Tag: v1.43.0~136^2~524 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=6ee31cccdcf9e79844a9f813e6e835281cc35ea1;p=simantics%2Fplatform.git Show instance for SafeDynamic refs #7839 Change-Id: Ib84dceb46e1d43666b8f089e75c79e52f7bc3390 --- diff --git a/bundles/org.simantics.scl.runtime/scl/SafeDynamic.scl b/bundles/org.simantics.scl.runtime/scl/SafeDynamic.scl index b113f8a60..4ed2f4206 100644 --- a/bundles/org.simantics.scl.runtime/scl/SafeDynamic.scl +++ b/bundles/org.simantics.scl.runtime/scl/SafeDynamic.scl @@ -6,6 +6,9 @@ data SafeDynamic = @FieldNames [type_, value] SafeDynamic Type Dynamic +instance Show SafeDynamic where + sb <+ SafeDynamic t v = sb << "SafeDynamic " <+ t + toSafeDynamic :: Typeable a => a -> SafeDynamic toSafeDynamic val = SafeDynamic (typeOf val) (toDynamic val)