-
Notifications
You must be signed in to change notification settings - Fork 89
Package Versioning Policy
We strive to keep the Haskell PVP. Since Fay is a compiler this has some additional implications. We need to do a major bump when
- The Haskell API interface changes as the HaskellWiki article mentions, to avoid breaking packages like
snaplet-fay
- Command line flags to the compiler are changed, to avoid breaking make files
- Certain parts of the generated output is modified
The most subtle of these is the generated output. It can be useful to use some internal functions from JS or through the FFI. Prelude for example contains
print :: Automatic a -> Fay ()
print = ffi "console.log(%1)"
Since the argument is Automatic
type conversion may occur. Sometimes you just want to print the exact fay value when debugging and then you need to define a custom print:
print' :: a -> Fay ()
print' = ffi "console.log(Fay$$_(%1))"
This contains a force call (Fay$$_
) since printing a thunk isn't very useful. Using things like this in production is a bit iffy but we still don't want to break people's programs unexpectedly when they update fay. Therefore changing the name of Fay$$_
would incline us to make it a major bump of the whole fay package.
Either way, we'll document changes like this so keep your eyes on the changelog when installing a new version!