-
Notifications
You must be signed in to change notification settings - Fork 138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add special rule for string literals #415
Conversation
We're going to regret this later :) On Fri, Jul 10, 2015 at 9:36 AM, Eric Seidel [email protected]
Ranjit. |
I know, we'll never remember to |
Well, the tests will break (hopefully) ... On Fri, Jul 10, 2015 at 9:56 AM, Eric Seidel [email protected]
Ranjit. |
Instead of hardcoding that, can't we find a way to encode this information in our |
@nikivazou do you mean the name |
It does not have to be encoded in the Btw, strings are treated as constant literals, maybe we can use this information. For example give the literal a type that knows its
|
Yes, I thought about that approach after I replied. But then we're just hardcoding something else in our typing rules, the |
I was thinking that the At any case the |
Agree with @gridaphobe here. On Fri, Jul 10, 2015 at 10:49 AM, Eric Seidel [email protected]
Ranjit. |
My objection is that currently liquidHaskell does not know what Also, if you want to ignore the string's length information you can just edit the type |
That's a fair point, in fact this might even make fixpoint/z3 crash if you removed An alternative would be to just wire-in |
(Wiring-in |
On the other hand, the intention is to have |
How would that work? The measure-lifting functionality requires the source code, so you couldn't put it in (Also, the Foldable/Traversable changes in 7.10 included replacing the specialized |
Except that I really don't want 'len' wired-in. I guess Niki's point is
? Which does make sense, assuming we have to wire something in... On Fri, Jul 10, 2015 at 11:15 AM, Eric Seidel [email protected]
Ranjit. |
Yes, wiring in 'len' is non-option. On Fri, Jul 10, 2015 at 11:36 AM, Ranjit Jhala [email protected] wrote:
Ranjit. |
@ranjitjhala this is indeed my point. @gridaphobe my understanding is that we wish to go to a point where there will be no |
@nikivazou (this is starting to get way off topic, but..) can you point me to the discussion of removing the |
More on topic, I'm fine with @nikivazou's rule, I'll update the PR. |
re: .spec files -- @spinda has managed to do this: https://github.com/spinda/liquidhaskell/tree/iface/std/base-4.8.0.0/GHC On Fri, Jul 10, 2015 at 11:50 AM, Eric Seidel [email protected]
Ranjit. |
I see, so the idea is not really to get rid of the |
The point is the QQ files are "understood" and imported by GHC and cabal On Fri, Jul 10, 2015 at 12:10 PM, Eric Seidel [email protected]
Ranjit. |
Sure, but I thought @nikivazou was suggesting the much more ambitious task of removing the default specs entirely by convincing people to adopt them :) |
@nikivazou I made the edit you suggested, but it doesn't work. The inferred type for
is
which is VERY strange, since the type for
Why is |
@gridaphobe what is strangle about it? I think this is the expected type. We now just need to teach logic that |
It is totally not clear how to teach the logic any such thing... I think we should just adopt Eric's original solution for now, and revisit this with some proper solution for how to deal with literals.
|
We could just put into the fixpoint environment a binder |
@nikivazou I would expect
in an environment where |
Ah, but of course if we did ANF literals, we would be stuck with predicates drawn from the qualifier set... |
The only remaining test failures on travis are the usual |
add special rule for string literals fixes #414
Yes, exit code 137 is when the OS kills the process before it completes, most likely due to running out of memory. |
fixes #414