compiler
compiler copied to clipboard
non-breaking type changes should be minor/patch
The sem-ver could be less strict when changing the type in a minor way. Suggestion: Mark the following cases as minor changes:
Going from Specific or constrainedTypeVariable to typeVariable
- ifJust : Maybe Int -> Bool
+ ifJust : Maybe a -> Bool
- nothing : Maybe Int
+ nothing : Maybe a
- empty : List number
+ empty : List a
- sum : List Int -> Int
+ sum : List number -> number
- origin : ( Int, Int )
+ origin : ( number, number )
- sort : List String -> List String
+ sort : List comparable -> comparable
In these two cases, the functions can still be used like in older versions (→ no breaking API change). This does allow for more ways to interact with the API, though → minor change.
An example of where I've come across this is with phantom types, like in typesafe-array.
An example: Every first type argument of Arr will be a In min max. Neither min nor max will be used in the type, so we can simply write length.
- Arr (In min max) ...
+ Arr length ...
- Elm: 0.19.1
Thanks for reporting this! To set expectations:
- Issues are reviewed in batches, so it can take some time to get a response.
- Ask questions in a community forum. You will get an answer quicker that way!
- If you experience something similar, open a new issue. We like duplicates.
Finally, please be patient with the core team. They are trying their best with limited resources.