Skip to content
Snippets Groups Projects
Commit 13c52eb2 authored by Ross Paterson's avatar Ross Paterson
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
Branches master
No related tags found
No related merge requests found
...@@ -327,6 +327,14 @@ tc_expr (ExplicitTuple exprs boxity) res_ty ...@@ -327,6 +327,14 @@ tc_expr (ExplicitTuple exprs boxity) res_ty
tc_expr (HsProc pat cmd) res_ty tc_expr (HsProc pat cmd) res_ty
= tcProc pat cmd res_ty `thenM` \ (pat', cmd') -> = tcProc pat cmd res_ty `thenM` \ (pat', cmd') ->
returnM (HsProc 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} \end{code}
%************************************************************************ %************************************************************************
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment