unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
blob 6d05048dcbd274bf4c467cc12de5ffcf6a76393e 1395 bytes (raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
 
Index: source/telingo/transformers/head.py
===================================================================
--- source.orig/telingo/transformers/head.py
+++ source/telingo/transformers/head.py
@@ -564,10 +564,12 @@ class HeadTransformer:
                 cond = []
                 diff = _ast.BinaryOperation(loc, _ast.BinaryOperator.Minus, param, shift)
                 if lhs.ast_type != _ast.ASTType.SymbolicTerm or lhs.symbol.type != _clingo.SymbolType.Number or lhs.symbol.number > 0:
-                    cond.append(_ast.Literal(loc, _ast.Sign.NoSign, _ast.Comparison(_ast.ComparisonOperator.LessEqual, lhs, diff)))
+                    cond.append(_ast.Literal(loc, _ast.Sign.NoSign,
+                                             _ast.Comparison(lhs, [_ast.Guard(_ast.ComparisonOperator.LessEqual, diff)])))
 
                 if rhs.ast_type != _ast.ASTType.SymbolicTerm or rhs.symbol.type != _clingo.SymbolType.Supremum:
-                    cond.append(_ast.Literal(loc, _ast.Sign.NoSign, _ast.Comparison(_ast.ComparisonOperator.LessEqual, diff, rhs)))
+                    cond.append(_ast.Literal(loc, _ast.Sign.NoSign,
+                                             _ast.Comparison(diff, [_ast.Guard(_ast.ComparisonOperator.LessEqual, rhs)])))
 
                 elems.extend([_ast.ConditionalLiteral(loc, _ast.Literal(loc, _ast.Sign.NoSign, head), cond) for head in heads])
 

debug log:

solving 6d05048dcb ...
found 6d05048dcb in https://git.savannah.gnu.org/cgit/guix.git

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).