diff --git a/src/main/java/edu/kit/typicalc/view/content/typeinferencecontent/latexcreator/LatexCreatorConstraints.java b/src/main/java/edu/kit/typicalc/view/content/typeinferencecontent/latexcreator/LatexCreatorConstraints.java index b77ea77..7a4e583 100644 --- a/src/main/java/edu/kit/typicalc/view/content/typeinferencecontent/latexcreator/LatexCreatorConstraints.java +++ b/src/main/java/edu/kit/typicalc/view/content/typeinferencecontent/latexcreator/LatexCreatorConstraints.java @@ -284,8 +284,9 @@ public class LatexCreatorConstraints implements StepVisitor { latex.delete(latex.length() - LATEX_NEW_LINE.length(), latex.length()); latex.append(SPLIT_END); if (error.isPresent()) { - latex.append(LATEX_NEW_LINE + AMPERSAND); + latex.append(LATEX_NEW_LINE + LATEX_NEW_LINE + AMPERSAND + TEXT + CURLY_LEFT); latex.append(translationProvider.apply(error.get())); + latex.append(CURLY_RIGHT); } steps.add(latex.toString()); } diff --git a/src/main/resources/language/general.properties b/src/main/resources/language/general.properties index 354c1c2..001381c 100644 --- a/src/main/resources/language/general.properties +++ b/src/main/resources/language/general.properties @@ -23,7 +23,7 @@ root.termGrammar=\u2329Term\u232A ::= (\u2329Term\u232A) | \u2329App\u232A | \u2 root.assGrammar=\u2329Type\u232A ::= (\u2329Type\u232A) | \u2329NamedType\u232A | \u2329VarType\u232A | \ \u2329FunctionType\u232A
\ -\u2329NamedType\u232A ::= [a-zA-Z][a-zA-Z0-9]*
\ +\u2329NamedType\u232A ::= [a-zA-Z][a-zA-Z0-9]*  \\t[0-9]+
\ \u2329VarType\u232A ::= t[0-9]+
\ \u2329FunctionType\u232A ::= \u2329Type\u232A -> \u2329Type\u232A diff --git a/src/main/resources/language/translation_de.properties b/src/main/resources/language/translation_de.properties index 8316f1b..9fffbd0 100644 --- a/src/main/resources/language/translation_de.properties +++ b/src/main/resources/language/translation_de.properties @@ -112,6 +112,11 @@ root.absLetLatex=\ \\BinaryInfC{$\\Gamma \\vdash \\lambda \\texttt{x}.t : \\tau_1 \\rightarrow \\tau_2$}\ \\end{prooftree} +root.infinite_type = Der eingegebene Term ist nicht typisierbar: \ + Durch den hervorgehobenen Constraint würde sich ein unendlicher Typ ergeben! +root.different_types = Der eingegebene Term ist nicht typisierbar: \ + In dem hervorgehobenen Constraint werden zwei unvereinbare Typen gleichgesetzt! + share.url.label=URL share.packages.label=Pakete share.latex.label=LaTeX-Code diff --git a/src/main/resources/language/translation_en.properties b/src/main/resources/language/translation_en.properties index df7463f..4aee95c 100644 --- a/src/main/resources/language/translation_en.properties +++ b/src/main/resources/language/translation_en.properties @@ -105,6 +105,11 @@ root.absLetLatex=\ \\BinaryInfC{$\\Gamma \\vdash \\lambda \\texttt{x}.t : \\tau_1 \\rightarrow \\tau_2$}\ \\end{prooftree} +root.infinite_type = The entered term cannot be typed: \ + The highlighted Constraint would cause an infinite type! +root.different_types = The entered term cannot be typed: \ + The highlighted Constraint contains two incompatible types! + share.url.label=URL share.packages.label=Packages share.latex.label=LaTeX code