As found before dstep first equation:
-- @lena@, @lenb@ and @_d@ are named in the first equation as a workaround
-- to https://github.com/ucsd-progsys/liquidhaskell/issues/2704
dstep lena lenb _ _d [] = error "dstep: Cannot perform expansion on an empty list of nodes"
So ideally, after ucsd-progsys/liquidhaskell#2704 is solved, we could remove the unused variables from it:
diff --git a/src/Data/Algorithm/Diff.hs b/src/Data/Algorithm/Diff.hs
index a37c3cc3..8156edae 100644
--- a/src/Data/Algorithm/Diff.hs
+++ b/src/Data/Algorithm/Diff.hs
@@ -228,10 +228,10 @@ dstep
-> [DL] -- ^ A non-empty wave front of nodes at edit distance D+1
-- @lena@, @lenb@ and @_d@ are named in the first equation as a workaround
-- to https://github.com/ucsd-progsys/liquidhaskell/issues/2704
-dstep lena lenb _ _d [] = error "dstep: Cannot perform expansion on an empty list of nodes"
+dstep _ _ _ _ [] = error "dstep: Cannot perform expansion on an empty list of nodes"
-- This definition branches according to whether a node is on a boundary
-- to avoid constructing out-of-bound nodes and discarding other non-competing nodes.
-dstep lena lenb cd _ (dl:dls) =
+dstep lena lenb cd _d (dl:dls) =
if poi dl >= lena then stepAndMerge dl dls
else
(addsnake lena lenb cd (hStep dl) : stepAndMerge dl dls)
An thus get rid of the awkward presence of lena and lenb in that equation and the related warnings. Notice _d is unused in both equations, but it's relevant for the specification of the second equation local functions; with this change it gets to sit in its proper place.
As found before
dstepfirst equation:So ideally, after ucsd-progsys/liquidhaskell#2704 is solved, we could remove the unused variables from it:
An thus get rid of the awkward presence of
lenaandlenbin that equation and the related warnings. Notice_dis unused in both equations, but it's relevant for the specification of the second equation local functions; with this change it gets to sit in its proper place.