Yes, that error did not appear with Elm 0.17. Changing the comparison to 
index >= period did not help.
However, I turned "number" in the type annotation to Float, and now it 
works.

Am Dienstag, 15. November 2016 12:49:28 UTC+1 schrieb Janis Voigtländer:
>
> Two part answer:
>
> 1) Type-checking with number types has been partly broken for a while. See 
> #1268 
> <https://www.google.com/url?q=https%3A%2F%2Fgithub.com%2Felm-lang%2Felm-compiler%2Fissues%2F1268&sa=D&sntz=1&usg=AFQjCNHv24aBPxT9YOEqY_rqhX2mPKjc_w>,
>  
> #1270 <https://github.com/elm-lang/elm-compiler/issues/1270>, #1281 
> <https://github.com/elm-lang/elm-compiler/issues/1281>, #1316 
> <https://github.com/elm-lang/elm-compiler/issues/1316>, which are part of 
> #1373 <https://github.com/elm-lang/elm-compiler/issues/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 <[email protected] <javascript:>>:
>
>> 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 [email protected] <javascript:>.
>> 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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to