Skip to content

Commit 9fcf5c0

Browse files
author
Laurent
committed
Replace Vector with List
1 parent aa272f4 commit 9fcf5c0

2 files changed

Lines changed: 2 additions & 3 deletions

File tree

core/package.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ library:
1616
- template-haskell
1717
- text
1818
- unordered-containers
19-
- vector
2019
- wl-pprint-text
2120

2221
tests:

core/src/Language/Avaleryar/Semantics.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ compilePred rules =
283283
if all isFact rules
284284
then
285285
-- We precompute the set
286-
let setOfVals = Vector.fromList $ fmap (mapMaybe termVal . litTerms . ruleLit) rules
286+
let setOfVals = fmap (mapMaybe termVal . litTerms . ruleLit) rules
287287
in \arg@(Lit _ qas) -> do
288288
qas <- traverse subst qas
289289
let f term (allVals, vals) = case term of
@@ -294,7 +294,7 @@ compilePred rules =
294294
-- In that case, if the values of qas are in the set, the predicate succeeds.
295295
-- Otherwise, it fails.
296296
if allVals
297-
then guard (Vector.elem vals setOfVals)
297+
then guard (elem vals setOfVals)
298298
-- If qas aren't all values, we can't use the set and must fallback to the default behavior.
299299
-- This is because in this case the variables will be unified with the values, so it's not just
300300
-- a guard.

0 commit comments

Comments
 (0)