guida-lang / compiler

Guida is a functional programming language that builds upon the solid foundation of Elm, offering backward compatibility with all existing Elm 0.19.1 projects
https://guida-lang.org
Other
41 stars 2 forks source link

`guida diff elm/json 1.0.0 1.1.2` shows wrong result #35

Closed decioferreira closed 1 month ago

decioferreira commented 1 month ago

When running elm diff elm/json 1.0.0 1.1.2, this is the result we see:

% elm diff elm/json 1.0.0 1.1.2    
This is a MINOR change.

---- Json.Decode - MINOR ----

    Added:
        oneOrMore : (a -> List a -> value) -> Decoder a -> Decoder value

This is the result we get when running it with guida:

% guida diff elm/json 1.0.0 1.1.2
Compiled in DEBUG mode. Follow the advice at https://elm-lang.org/0.19.1/optimize for better performance and smaller assets.
This is a MAJOR change.

---- Json.Decode - MAJOR ----

    : Added
        : oneOrMore (a -> List a -> value) -> Decoder a -> Decoder value

    : Changed
      - type Error
            Field String Error =
            Index Int Error |
            OneOf (List Error) |
            Failure String Value |
      + type Error
            Field String Error =
            Index Int Error |
            OneOf (List Error) |
            Failure String Value |

      - = Value alias type Value
      + = Value alias type Value

      - : bool Decoder Bool
      + : bool Decoder Bool

      - : errorToString Error -> String
      + : errorToString Error -> String

      - : float Decoder Float
      + : float Decoder Float

      - : int Decoder Int
      + : int Decoder Int

      - : string Decoder String
      + : string Decoder String

      - : value Decoder Value
      + : value Decoder Value

---- Json.Encode - MAJOR ----

    : Changed
      - : bool Bool -> Value
      + : bool Bool -> Value

      - : encode Int -> Value -> String
      + : encode Int -> Value -> String

      - : float Float -> Value
      + : float Float -> Value

      - : int Int -> Value
      + : int Int -> Value

      - : null Value
      + : null Value

      - : object List ( String, Value ) -> Value
      + : object List ( String, Value ) -> Value

      - : string String -> Value
      + : string String -> Value