--- /dev/null
+package org.simantics.scl.expressions;\r
+\r
+import org.simantics.scl.compiler.types.Type;\r
+\r
+/**\r
+ * A value that depends on some context. For example SCL expression\r
+ * can be compiled into contextual value where the actual value\r
+ * depends on the free variables of the expression.\r
+ * @author Hannu Niemistö\r
+ * @param <Context>\r
+ */\r
+public interface ContextualValue<Context> {\r
+ /**\r
+ * SCL type of the value.\r
+ * @return\r
+ */\r
+ Type getType();\r
+ \r
+ /**\r
+ * Evaluates the value in the given context.\r
+ * @param context\r
+ * @return\r
+ */\r
+ Object getValue(Context context);\r
+}\r