In einem Projekt arbeite ich an mit einem Kollegen, sind usign wir das UrlParser
Modul und wir in diesem Fehler gestolpert:Unendlichkeitssymbol in Elm
The type annotation for ourParser does not match its definition.
The type annotation is saying:
UrlParser.Parser a a
But I am inferring that the definition has this type:
UrlParser.Parser (String -> ∞) (String -> ∞)
Hint: A type annotation is too generic. You can probably just switch
to the type I inferred. These issues can be subtle though, so read
more about it.
Unser Code ist so etwas wie
ourParser : UrlParser.Parser a a
ourParser =
UrlParser.oneOf
[ UrlParser.s "home"
, UrlParser.s "detail" </> UrlParser.string
]
Die Hauptfrage ist: Was ist das ∞
Symbol? Wo ist es definiert? Wenn ich versuche, es in meiner Funktionsdefinition zu kopieren, bekomme ich einen Syntaxfehler, als ob Elm eigentlich nicht wüsste, was dieses Zeichen ist ...
Die folgende Frage ist: Wie ein solcher Fehler mit meinem Code passiert ?