Repeat returns a list of Cons's#180
Conversation
|
@nikivazou are you comfortable merging this? The main concern would be the use of |
|
I think expanding |
|
Can you remind me why you think we'd have to expand an |
|
You should be right, a single expansion suffices; which is less hacky than 2 expansions. If every expansion in |
Conflicts: src/Language/Haskell/Liquid/Constraint.hs src/Language/Haskell/Liquid/Fresh.hs src/Language/Haskell/Liquid/GhcMisc.hs src/Language/Haskell/Liquid/Parse.hs src/Language/Haskell/Liquid/PredType.hs src/Language/Haskell/Liquid/Types.hs
b715d79 to
cd9676b
Compare
|
@nikivazou if you have time, can you take another look at this and figure out why the |
|
@gridaphobe did you try merging this branch into master? |
|
I merged master into it, and the two safeZips still blow up unfortunately.. On Wednesday, August 27, 2014, Niki Vazou notifications@github.com wrote:
Sent from Gmail Mobile |
|
Weird... If you need it for your demo you can merge, but I still prefer |
|
I don't need it for the demo, and none of us want to remove the safeZips :) But it would be nice to merge this branch at some point. On Wednesday, August 27, 2014, Niki Vazou notifications@github.com wrote:
Sent from Gmail Mobile |
|
Sure, I will take a look when I find some time |
|
The bug tickled by this is in Lets not just replace safeZip with zip until the cause is found. |
… into repeat Conflicts: src/Language/Haskell/Liquid/Constraint.hs src/Language/Haskell/Liquid/PredType.hs
Repeat returns a list of Cons's also fixes #235
We can prove that
repeatreturns aListwith noNils, and that we can safelytakeany number of elements fromrepeat.The code is somewhat hacky, I've changed
refreshto only expandRefs twice so we don't get an infinite loop when trying to expand a recursiveRef. This required changing a fewsafeZips inConstraintto regularzips because not all instances of anRAppwill have the correct number ofRefs.. But it works empirically, i.e. none of our existing tests break..