<div dir="ltr">In other words, the PVP is not rigorously specified, and this particular question is uncharted territory.<div><br></div><div>My initial interpretation of the PVP is one of subtyping. I consider loosening type signatures as a minor version bump, because the new thing still fits into holes shaped like the old thing.<br><br>However, seen a different way, you could say that previously, IO () was just a value, but now, it's (forall a. IO a), which is basically (a:Type -> IO a), if Haskell were dependently typed. Going from a value to a function is definitely a major change.<br><br>Was that sufficiently unhelpful? :P I think my conclusion is perhaps that the PVP should remain undefined on this particular question, since I see no obvious answer. Or, since the PVP already encourages a cautious over-estimate of what constitutes a breaking change, perhaps we should go with this fallback: "when in doubt, call it a major change."</div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature">-- Dan Burton</div></div>
<br><div class="gmail_quote">On Mon, Dec 15, 2014 at 9:10 AM, Roman Cheplyaka <span dir="ltr"><<a href="mailto:roma@ro-che.info" target="_blank">roma@ro-che.info</a>></span> wrote:<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Almost any API change can break existing code.<br>
<br>
For example, adding a new function can break code.<br>
<br>
I thought the guiding principle for PVP was how likely it is that a<br>
piece of client code will break, not if that's theoretically possible.<br>
<span class="im HOEnZb"><br>
On 15/12/14 11:44, Johan Tibell wrote:<br>
> I think the question is: can this change cause existing code to stop<br>
> compiling (perhaps assuming people aren't using -Werror)? I don't think<br>
> it can but perhaps generalizing the type could make type inference fail<br>
> somewhere due to an ambiguous type.<br>
><br>
> We really need a PVP guide that just lists lots of examples, each with a<br>
> note of what kind of change it is (i.e. major, minor, or patch).<br>
><br>
> On Mon, Dec 15, 2014 at 10:00 AM, Michael Snoyman <<a href="mailto:michael@snoyman.com">michael@snoyman.com</a><br>
</span><div class="HOEnZb"><div class="h5">> <mailto:<a href="mailto:michael@snoyman.com">michael@snoyman.com</a>>> wrote:<br>
><br>
>     I'm a little bit uncertain of the PVP guidelines in a certain<br>
>     case[1], so I'd like to get some guidance/clarity. Suppose I have a<br>
>     library which provides the function:<br>
><br>
>     myFunction :: IO ()<br>
>     myFunction = forever $ putStrLn "Still here" >> threadDelay 10^6<br>
><br>
>     Later, I realize (or someone points out to me) that I've<br>
>     over-specified the type signature, and really myFunction should be:<br>
><br>
>         myFunction :: IO a<br>
><br>
>     In this case, does the PVP specify that we should have a minor or a<br>
>     major version bump? I'm not certain if this counts as a breaking<br>
>     change or not.<br>
><br>
>     [1] <a href="https://github.com/fpco/streaming-commons/pull/13" target="_blank">https://github.com/fpco/streaming-commons/pull/13</a><br>
<br>
_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
</div></div></blockquote></div></div>