aboutsummaryrefslogtreecommitdiff
path: root/frontend/convertDynamics.icl
diff options
context:
space:
mode:
authorronny2003-04-09 12:10:45 +0000
committerronny2003-04-09 12:10:45 +0000
commita2d1ea73ec2c08b7182d0d4be2d2281bdadf6eb0 (patch)
tree06d55adc359da46abae63d76a8b2d11b6200fa76 /frontend/convertDynamics.icl
parentmake toString (STE_Kind) total, fixes bug #19 (diff)
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
Diffstat (limited to 'frontend/convertDynamics.icl')
-rw-r--r--frontend/convertDynamics.icl15
1 files changed, 9 insertions, 6 deletions
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)