What you encountered is https://github.com/elm-lang/elm-compiler/issues/1214, and it is fixed in version 0.18 of the compiler.
Am Freitag, 11. November 2016 schrieb Matthieu Pizenberg : > Hi, > > I just came accross one very strange compiler error and wanted to have the > point of view of the community before creating any github issue. > I wrote some code to create <select> tag more easily (seems to be trendy > these days ^^) in a module Helpers.Views.elm. When I put a type annotation > for a very simple variable (see gist here > <https://gist.github.com/mpizenberg/ddc7a7449a4b4eb5bc519f42860fb566#file-views-elm-L61>) > *inside* a let expression, the compiler goes crazy XD and tell me that > the type annotation of the function *containing* the let expression is > wrong and tell me what it should be -> (apparently it should be what I > wrote ^^). > > The type annotation is saying: > > (Maybe ( Int, a ) -> String) > -> Array a > -> Maybe ( Int, a ) > -> (Maybe ( Int, a ) -> b) > -> Html b > > But I am inferring that the definition has this type: > > (Maybe ( Int, a ) -> String) > -> Array a > -> Maybe ( Int, a ) > -> (Maybe ( Int, a ) -> b) > -> Html b > > All the corresponding code is on this gist > <https://gist.github.com/mpizenberg/ddc7a7449a4b4eb5bc519f42860fb566#file-views-elm-L61> > if you want to try by yourself. > Any idea ? > Should I fill a github issue ? > > -- > 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:_e(%7B%7D,'cvml','elm-discuss%[email protected]');> > . > 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.
