X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.scl.compiler%2Fsrc%2Forg%2Fsimantics%2Fscl%2Fcompiler%2Finternal%2Fcodegen%2Ftypes%2FMaybeType.java;h=3abe1fe4922a54169ffe2f83c7b5359bc1859590;hb=66ced93f835205135a84fea73b2fbb8e9d610f7e;hp=1f86f9278786e22628c4dc8ee5aed8433e62555e;hpb=969bd23cab98a79ca9101af33334000879fb60c5;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/internal/codegen/types/MaybeType.java b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/internal/codegen/types/MaybeType.java index 1f86f9278..3abe1fe49 100644 --- a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/internal/codegen/types/MaybeType.java +++ b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/internal/codegen/types/MaybeType.java @@ -1,24 +1,24 @@ -package org.simantics.scl.compiler.internal.codegen.types; - -import org.cojen.classfile.TypeDesc; -import org.simantics.scl.compiler.elaboration.modules.TypeConstructor; -import org.simantics.scl.compiler.types.Type; -import org.simantics.scl.compiler.types.Types; -import org.simantics.scl.compiler.types.kinds.Kinds; - -public class MaybeType extends TypeConstructor { - public static final MaybeType INSTANCE = new MaybeType(); - - private MaybeType() { - super(Types.MAYBE, Kinds.STAR_TO_STAR); - isOpen = false; - setType(Types.con(Types.BUILTIN, "Maybe"), Types.var(Kinds.STAR)); - documentation = "Represents an optional value."; - } - - @Override - public TypeDesc construct(JavaTypeTranslator translator, Type[] parameters) { - return JavaTypeTranslator.toObjectType(translator.toTypeDesc(parameters[0])); - } - -} +package org.simantics.scl.compiler.internal.codegen.types; + +import org.cojen.classfile.TypeDesc; +import org.simantics.scl.compiler.elaboration.modules.TypeConstructor; +import org.simantics.scl.compiler.types.Type; +import org.simantics.scl.compiler.types.Types; +import org.simantics.scl.compiler.types.kinds.Kinds; + +public class MaybeType extends TypeConstructor { + public static final MaybeType INSTANCE = new MaybeType(); + + private MaybeType() { + super(Types.MAYBE, Kinds.STAR_TO_STAR); + isOpen = false; + setType(Types.con(Types.BUILTIN, "Maybe"), Types.var(Kinds.STAR)); + documentation = "Represents an optional value."; + } + + @Override + public TypeDesc construct(JavaTypeTranslator translator, Type[] parameters) { + return JavaTypeTranslator.toObjectType(translator.toTypeDesc(parameters[0])); + } + +}