Commit 13c52eb2 authored by ross's avatar ross
Browse files

[project @ 2004-03-12 21:37:27 by ross]

Deal gracefully with arrow commands where an expression is expected,
instead of panicking.  (Bug reported by Isaac Jones)

merge to STABLE
parent 3a5bcf08
......@@ -327,6 +327,14 @@ tc_expr (ExplicitTuple exprs boxity) res_ty
tc_expr (HsProc pat cmd) res_ty
= tcProc pat cmd res_ty `thenM` \ (pat', cmd') ->
returnM (HsProc pat' cmd')
tc_expr e@(HsArrApp _ _ _ _ _) _
= failWithTc (vcat [ptext SLIT("The arrow command"), nest 2 (ppr e),
ptext SLIT("was found where an expression was expected")])
tc_expr e@(HsArrForm _ _ _) _
= failWithTc (vcat [ptext SLIT("The arrow command"), nest 2 (ppr e),
ptext SLIT("was found where an expression was expected")])
\end{code}
%************************************************************************
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment