From 38187b1052ce5d1350d6b995cfdf20dd2dd75c16 Mon Sep 17 00:00:00 2001 From: Georgy Lukyanov Date: Tue, 22 Oct 2024 13:37:56 +0200 Subject: [PATCH] Do not override with old substitution when externalising --- booster/library/Booster/Syntax/Json/Externalise.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/booster/library/Booster/Syntax/Json/Externalise.hs b/booster/library/Booster/Syntax/Json/Externalise.hs index 7c75e7aaec..3e3abd4e45 100644 --- a/booster/library/Booster/Syntax/Json/Externalise.hs +++ b/booster/library/Booster/Syntax/Json/Externalise.hs @@ -36,7 +36,8 @@ externalisePattern :: externalisePattern Internal.Pattern{term = term, constraints, ceilConditions, substitution = ensuredSubstitution} inputSubstitution = -- need a sort for the predicates in external format let sort = externaliseSort $ sortOfTerm term - substitutions = inputSubstitution <> (ensuredSubstitution `Substitution.compose` inputSubstitution) + -- inputSubstitution is probably not needed here at all + substitutions = ensuredSubstitution `Substitution.compose` inputSubstitution externalisedSubstitution = if null substitutions then Nothing