Absref bugfix#235
Conversation
|
@ranjitjhala travis says it doesn't break any tests, which I believe. Unfortunately it does not suffice for Furthermore, I can trivially re-break |
|
@ranjitjhala I added a couple more |
|
@gridaphobe I simplified the whole pad thing a bit -- so at least its not LENGTH but the fact that one or the other is empty. This seems to work for the $ thing, can you try it on the Repeat.hs ? |
|
@nikivazou I think the bug here is probably that at various places, probably in Bare, we create |
|
@ranjitjhala nice, it works for Repeat.hs and IcfpDemo.hs. If travis says everything else passes, I'll go ahead and merge my branch, which now includes this one. |
There was a problem hiding this comment.
@ranjitjhala we've got a bunch of failing neg-tests now, and I suspect they're due to this line. Seems to me we should return both lists as is if they have equal length.
There was a problem hiding this comment.
Duh! Of course! Obvious typo and my bad. pretty shocked that ALL tests didn't fail.
Thank god for tests. ;)
On Aug 29, 2014, at 8:38 AM, Eric Seidel notifications@github.com wrote:
In src/Language/Haskell/Liquid/Misc.hs:
@@ -61,3 +61,16 @@ mapNs ns f xs = foldl (\xs n -> mapN n f xs) xs ns
mapN 0 f (x:xs) = f x : xs
mapN n f (x:xs) = x : mapN (n-1) f xs
mapN _ _ [] = []
+
++pad _ f [] ys = (f <$> ys, ys)
+pad _ f xs [] = (xs, f <$> xs)
+pad msg f xs ys
- | nxs == nys = (xs, f <$> xs)
@ranjitjhala we've got a bunch of failing neg-tests now, and I suspect they're due to this line. Seems to me we should return both lists as is if they have equal length.—
Reply to this email directly or view it on GitHub.
There was a problem hiding this comment.
Note that this whole business is actually a perfect use case for LH: add a 'numRef' parameter to the tycon and specify that the lenght of the refs equals numRef...
On Aug 29, 2014, at 8:46 AM, Ranjit Jhala rjhala@eng.ucsd.edu wrote:
Duh! Of course! Obvious typo and my bad. pretty shocked that ALL tests didn't fail.
Thank god for tests. ;)
On Aug 29, 2014, at 8:38 AM, Eric Seidel notifications@github.com wrote:
In src/Language/Haskell/Liquid/Misc.hs:
@@ -61,3 +61,16 @@ mapNs ns f xs = foldl (\xs n -> mapN n f xs) xs ns
mapN 0 f (x:xs) = f x : xs
mapN n f (x:xs) = x : mapN (n-1) f xs
mapN _ _ [] = []
+
++pad _ f [] ys = (f <$> ys, ys)
+pad _ f xs [] = (xs, f <$> xs)
+pad msg f xs ys
- | nxs == nys = (xs, f <$> xs)
@ranjitjhala we've got a bunch of failing neg-tests now, and I suspect they're due to this line. Seems to me we should return both lists as is if they have equal length.—
Reply to this email directly or view it on GitHub.
Repeat returns a list of Cons's also fixes #235
Potential bug fix for tests/todo/absref-crash.hs
Still slightly queasy about it it -- it
pads missingRPropusingtopwhich is ok, I guess. But the question is WHY are those missing?TODO:
Repeat.hsandIcfpDemo.hs@gridaphobe: can you check the TODO items above? I can't run it as they require your tweaks to the parser.
Perhaps you can merge this with your
Repeatbranch and see if the tests succeed? If so we could merge...