X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.scl.compiler%2Fsrc%2Forg%2Fsimantics%2Fscl%2Fcompiler%2Ftypes%2FTypes.java;h=5512f5e6e10fedf946b6d10dc421e48490256c93;hp=9ea064cfd11bf4abf4094a900a53d9951dc24878;hb=6fd9bc1ec7e95848d0cc15d12825a65a4b57ada5;hpb=bf5f7cda1b9b64484cc6e53499e38d6785744aec diff --git a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/types/Types.java b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/types/Types.java index 9ea064cfd..5512f5e6e 100644 --- a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/types/Types.java +++ b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/types/Types.java @@ -84,6 +84,7 @@ public class Types { public static final TCon TYPEABLE = con(BUILTIN, "Typeable"); public static final TCon SERIALIZABLE = con(BUILTIN, "Serializable"); public static final TCon VEC_COMP = con(BUILTIN, "VecComp"); + public static final TCon CLASS = con(BUILTIN, "Class"); public static final TCon BINDING = con(BUILTIN, "Binding"); public static final TCon TYPE = con(BUILTIN, "Type"); @@ -93,6 +94,7 @@ public class Types { public static final TCon ADDITIVE = con("Prelude", "Additive"); public static final TCon MONAD = con("Prelude", "Monad"); + public static final TCon MONAD_E = con("Prelude", "MonadE"); public static final TCon INTEGRAL = con("Prelude", "Integral"); public static final TCon RING = con("Prelude", "Ring"); public static final TCon ORDERED_RING = con("Prelude", "OrderedRing"); @@ -110,6 +112,7 @@ public class Types { public static final TUnion NO_EFFECTS = new TUnion(); public static final TCon PROC = con(BUILTIN, "Proc"); + public static final TCon EXCEPTION = con(BUILTIN, "Exception"); public static final TCon BRANCH_POINT = con(BUILTIN, "BranchPoint"); @@ -1048,6 +1051,10 @@ public class Types { public static Type union(Type effect1, Type effect2) { return new TUnion(effect1, effect2); } + + public static Type union(Type effect1, Type effect2, Type effect3) { + return new TUnion(effect1, effect2, effect3); + } public static Type union(List effects) { if(effects.size() == 0) @@ -1118,17 +1125,9 @@ public class Types { return parseType(new TypeElaborationContext(environment), text); } - public static Type parseType(ITypeEnvironment environment, THashMap localTypeVars, String text) throws SCLTypeParseException { - return parseType(new TypeElaborationContext(localTypeVars, environment), text); - } - public static Type parseType(String text) throws SCLTypeParseException { return parseType(new TypeElaborationContext(DUMMY_TYPE_ENVIRONMENT), text); } - - public static Type parseType(THashMap localTypeVars, String text) throws SCLTypeParseException { - return parseType(new TypeElaborationContext(localTypeVars, DUMMY_TYPE_ENVIRONMENT), text); - } private static Type parseType(TypeElaborationContext context, String text) throws SCLTypeParseException { SCLParserImpl parser = new SCLParserImpl(new StringReader(text));