Commit 568f333c authored by Ronny Wichers Schreur's avatar Ronny Wichers Schreur 🏢
Browse files

don't call normalise if there are no variables in the type

parent df19db8a
...@@ -565,12 +565,15 @@ convertExprTypeCode cinp tce ci ...@@ -565,12 +565,15 @@ convertExprTypeCode cinp tce ci
| not (isEmpty binds) | not (isEmpty binds)
= abort "unexpected binds in expression type code" = abort "unexpected binds in expression type code"
// ... sanity check // ... sanity check
# (normalise_symb, ci) | has_var
= getSymbol PD_Dyn_normalise SK_Function 2 ci # (normalise_symb, ci)
# type_code = getSymbol PD_Dyn_normalise SK_Function 2 ci
= App { app_symb = normalise_symb, # type_code
app_args = [ BasicExpr (BVB has_var), Var cinp.cinp_subst_var, type_code], app_info_ptr = nilPtr } = App { app_symb = normalise_symb,
= (type_code, ci) app_args = [ Var cinp.cinp_subst_var, type_code], app_info_ptr = nilPtr }
= (type_code, ci)
// otherwise
= (type_code, ci)
convertPatternTypeCode :: !ConversionInput !TypeCodeExpression !*ConversionState convertPatternTypeCode :: !ConversionInput !TypeCodeExpression !*ConversionState
-> (!Expression, ![LetBind], !*ConversionState) -> (!Expression, ![LetBind], !*ConversionState)
......
Supports Markdown
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