File tree 2 files changed +3
-3
lines changed
2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -404,7 +404,7 @@ typeof expr = case expr of
404
404
then throwError $ TypeMismatch ta TBool
405
405
else
406
406
if tb /= tc
407
- then throwError $ TypeMismatch ta tb
407
+ then throwError $ TypeMismatch tb tc
408
408
else return tc
409
409
410
410
Tr -> return TBool
@@ -484,7 +484,7 @@ We can consider a very simple type system for our language that will consist of
484
484
$$
485
485
\begin{aligned}
486
486
\tau :=\ & \t{Int} \\
487
- & \t{Bool} \\
487
+ & \t{Bool} \\
488
488
& \tau \rightarrow \tau \\
489
489
\end{aligned}
490
490
$$
Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ typeof expr = case expr of
48
48
then throwError $ TypeMismatch ta TBool
49
49
else
50
50
if tb /= tc
51
- then throwError $ TypeMismatch ta tb
51
+ then throwError $ TypeMismatch tb tc
52
52
else return tc
53
53
54
54
check :: Expr -> Either TypeError Type
You can’t perform that action at this time.
0 commit comments