+ toString (ParseError p s) = concat [toString p,
+ "ParseError: ", s]
+ toString (UnifyError p t1 t2) = concat [toString p,
+ "Can not unify types, expected|given:\n", toString t1,
+ "\n", toString t2]
+ toString (InfiniteTypeError p t) = concat [toString p,
+ "Infinite type: ", toString t]
+ toString (FieldSelectorError p t fs) = concat [toString p,
+ "Can not run fieldselector '", toString fs, "' on type: ",
+ toString t]
+ toString (OperatorError p op t) = concat [toString p,
+ "Operator error, operator '", toString op, "' can not be",
+ "used on type: ", toString t]
+ toString (UndeclaredVariableError p k) = concat [toString p,
+ "Undeclared identifier: ", k]
+ toString (ArgumentMisMatchError p str) = concat [toString p,
+ "Argument mismatch: ", str]
+ toString (Error e) = concat ["Unknown error during semantical",
+ "analysis: ", e]