In a project I'm working on with a colleague, we are usign the UrlParser
module and we stumbled in this error:
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.
Our code is something like
ourParser : UrlParser.Parser a a
ourParser =
UrlParser.oneOf
[ UrlParser.s "home"
, UrlParser.s "detail" </> UrlParser.string
]
The main question is: what is this ∞
symbol? Where is it defined? If I try to copy/paste it in my function definition I get a syntax error, as if Elm actually doesn't know what that character is...
The following question is: how such an error happens with my code?