From a2d1ea73ec2c08b7182d0d4be2d2281bdadf6eb0 Mon Sep 17 00:00:00 2001 From: ronny Date: Wed, 9 Apr 2003 12:10:45 +0000 Subject: don't call normalise if there are no variables in the type git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@1337 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d --- frontend/convertDynamics.icl | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'frontend') diff --git a/frontend/convertDynamics.icl b/frontend/convertDynamics.icl index 55bd4b9..99c0347 100644 --- a/frontend/convertDynamics.icl +++ b/frontend/convertDynamics.icl @@ -565,12 +565,15 @@ convertExprTypeCode cinp tce ci | not (isEmpty binds) = abort "unexpected binds in expression type code" // ... sanity check - # (normalise_symb, ci) - = getSymbol PD_Dyn_normalise SK_Function 2 ci - # type_code - = App { app_symb = normalise_symb, - app_args = [ BasicExpr (BVB has_var), Var cinp.cinp_subst_var, type_code], app_info_ptr = nilPtr } - = (type_code, ci) + | has_var + # (normalise_symb, ci) + = getSymbol PD_Dyn_normalise SK_Function 2 ci + # type_code + = App { app_symb = normalise_symb, + app_args = [ Var cinp.cinp_subst_var, type_code], app_info_ptr = nilPtr } + = (type_code, ci) + // otherwise + = (type_code, ci) convertPatternTypeCode :: !ConversionInput !TypeCodeExpression !*ConversionState -> (!Expression, ![LetBind], !*ConversionState) -- cgit v1.2.3