Re: [elm-discuss] Elm 0.18: What's wrong with "number" type?

2016-11-15 Thread Janis Voigtländer
Two part answer:

1) Type-checking with number types has been partly broken for a while. See
#1268 , #1270
, #1281
, #1316
, which are part of
#1373 . It's possible
that you found an additional fail case, maybe even one that did not exist
with Elm 0.17.1 but appeared with Elm 0.18.

2) In your specific case, maybe you can salvage the situation by replacing
"index - period >= 0" by "index >= period"?


2016-11-15 12:13 GMT+01:00 Pi :

> I'm trying to upgrade ggb/elm-trend to Elm 0.18 but got stuck at this
> error message:
>
> -- TYPE MISMATCH -- src/
> Seasonal.elm
>
> The left argument of (>=) is causing a type mismatch.
>
> 101|  index - period >= 0
>   ^^
> (>=) is expecting the left argument to be a:
>
> comparable
>
> But the left argument is:
>
> number
>
> Hint: Only ints, floats, chars, strings, lists, and tuples are comparable.
>
> Detected errors in 1 module.
>
> See the source code here: https://github.com/Pisys/elm-
> trend/blob/upgrade/0.18/src/Seasonal.elm#L101
>
> I have no idea what I should do about this error message.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Elm Discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to elm-discuss+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups "Elm 
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elm-discuss+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[elm-discuss] Elm 0.18: What's wrong with "number" type?

2016-11-15 Thread Pi
I'm trying to upgrade ggb/elm-trend to Elm 0.18 but got stuck at this error 
message:

-- TYPE MISMATCH -- src/Seasonal
.elm

The left argument of (>=) is causing a type mismatch.

101|  index - period >= 0 
  ^^
(>=) is expecting the left argument to be a:

comparable

But the left argument is:

number

Hint: Only ints, floats, chars, strings, lists, and tuples are comparable.

Detected errors in 1 module.  

See the source code here: 
https://github.com/Pisys/elm-trend/blob/upgrade/0.18/src/Seasonal.elm#L101

I have no idea what I should do about this error message.

-- 
You received this message because you are subscribed to the Google Groups "Elm 
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elm-discuss+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.