1
1
mirror of https://github.com/github/semantic.git synced 2024-12-29 18:06:14 +03:00

Swap the operands to compare.

This commit is contained in:
Rob Rix 2016-06-27 15:59:37 -04:00
parent e003549ef0
commit c9733cdc5a

View File

@ -34,7 +34,7 @@ rws compare getLabel as bs
let (k, nearest) = (KdTree.nearest fas kv) let (k, nearest) = (KdTree.nearest fas kv)
if k `Set.member` mapped if k `Set.member` mapped
then pure $! insert v then pure $! insert v
else case compare v nearest of else case compare nearest v of
Just y -> do Just y -> do
put (Set.insert k mapped) put (Set.insert k mapped)
pure y pure y