Let's say I have the following code
module A where
x :: Int
x = 5
module Main where
import A
import Lib
main :: IO ()
main = print (x + y)
and in an external library
module Lib where
y :: Int
y = 10
All well and good, the library is at v0.1.0.0 and I include it with bounds mylib == 0.1.*
Now, the name x :: Int is added to the export list of MyLib and a new release is out. It's version is v0.1.1.0, as suggested in the PVP flowchart:
In this case, only [...] functions [...] were added to the library's exported interface. No breakage [...] could result
How is this assertion correct? Surely my code no longer compiles. Since it doesn't know where to pull x from.
mylib's interface alone that causes the breakage, which is what a major-number bump would indicate. People not usingAwon't see a problem with the introduction ofx. (I.e, it's notmylib's fault you aren't usingimport qualified A:) ) $\endgroup$