-package org.simantics.scl.compiler.constants.singletons;\r
-\r
-import org.simantics.scl.compiler.constants.FunctionValue;\r
-import org.simantics.scl.compiler.internal.codegen.references.Val;\r
-import org.simantics.scl.compiler.internal.codegen.utils.MethodBuilder;\r
-import org.simantics.scl.compiler.types.TCon;\r
-import org.simantics.scl.compiler.types.TVar;\r
-import org.simantics.scl.compiler.types.Type;\r
-import org.simantics.scl.compiler.types.Types;\r
-import org.simantics.scl.compiler.types.kinds.Kinds;\r
-\r
-public class TypeOfConstant extends FunctionValue {\r
- private static final TVar A = Types.var(Kinds.STAR);\r
- private static final TCon Type = Types.con(Types.BUILTIN, "Type");\r
- public static final TypeOfConstant INSTANCE = new TypeOfConstant();\r
- \r
- private TypeOfConstant() {\r
- super(new TVar[] {A}, Types.NO_EFFECTS, Type, \r
- Types.pred(Types.TYPEABLE, A), A);\r
- }\r
- \r
- @Override\r
- public Type applyExact(MethodBuilder mb, Val[] parameters) {\r
- mb.push(parameters[0], Type);\r
- return getReturnType();\r
- }\r
- \r
- @Override\r
- public String toString() {\r
- return "typeOf";\r
- }\r
+package org.simantics.scl.compiler.constants.singletons;
+
+import org.simantics.scl.compiler.constants.FunctionValue;
+import org.simantics.scl.compiler.internal.codegen.references.Val;
+import org.simantics.scl.compiler.internal.codegen.utils.MethodBuilder;
+import org.simantics.scl.compiler.types.TCon;
+import org.simantics.scl.compiler.types.TVar;
+import org.simantics.scl.compiler.types.Type;
+import org.simantics.scl.compiler.types.Types;
+import org.simantics.scl.compiler.types.kinds.Kinds;
+
+public class TypeOfConstant extends FunctionValue {
+ private static final TVar A = Types.var(Kinds.STAR);
+ private static final TCon Type = Types.con(Types.BUILTIN, "Type");
+ public static final TypeOfConstant INSTANCE = new TypeOfConstant();
+
+ private TypeOfConstant() {
+ super(new TVar[] {A}, Types.NO_EFFECTS, Type,
+ Types.pred(Types.TYPEABLE, A), A);
+ }
+
+ @Override
+ public Type applyExact(MethodBuilder mb, Val[] parameters) {
+ mb.push(parameters[0], Type);
+ return getReturnType();
+ }
+
+ @Override
+ public String toString() {
+ return "typeOf";
+ }