From: simonpj Date: Thu, 23 May 2002 15:37:32 +0000 (+0000) Subject: [project @ 2002-05-23 15:37:32 by simonpj] X-Git-Tag: Approx_11550_changesets_converted~2020 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=883a8fc6a85243015937ae93c3f569f82582c93e;hp=7a6b4575709851a7d3e391497a53afd69fcd0e76;p=ghc-hetmet.git [project @ 2002-05-23 15:37:32 by simonpj] Reject type arguments gracefully --- diff --git a/ghc/compiler/typecheck/TcExpr.lhs b/ghc/compiler/typecheck/TcExpr.lhs index 52ec896..e6a3d85 100644 --- a/ghc/compiler/typecheck/TcExpr.lhs +++ b/ghc/compiler/typecheck/TcExpr.lhs @@ -147,6 +147,14 @@ tcMonoExpr in_expr@(ExprWithTySig expr poly_ty) res_ty tcSubExp res_ty inst_sig_ty `thenTc` \ (co_fn, lie3) -> returnTc (co_fn <$> inst_fn expr', lie1 `plusLIE` lie2 `plusLIE` lie3) + +tcMonoExpr (HsType ty) res_ty + = failWithTc (text "Can't handle type argument:" <+> ppr ty) + -- This is the syntax for type applications that I was planning + -- but there are difficulties (e.g. what order for type args) + -- so it's not enabled yet. + -- Can't eliminate it altogether from the parser, because the + -- same parser parses *patterns*. \end{code}