You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Quick Summary: When destructuring a tuple a missing comma will lead the parser to correctly complain at the next token, but the message fails to communicate that a comma (,) is also a valid continuation of the pattern.
SSCCE
moduleMainexposing (..)
importBrowserimportHtmlexposing (Html, div, text)
-- MAINmain =Browser.sandbox { init = init, update = update, view = view }-- UPDATEupdate:()->Model->Modelupdate _ model =
model
-- MODELtype alias Model=Intinit:Modelinit =3-- VIEWview:Model->Html()view model =
div [][text (String.fromInt(factorial (model,0)))]factorial: (Int, Int) ->Intfactorial (i _)=if i <=1then 1else i *(factorial (i -1,1))
UNFINISHED PARENTHESES
Jump to problem
I was partway through parsing a pattern, but I got stuck here:
27| factorial (i _) =
^
I was expecting a closing parenthesis next, so try adding a ) to see if that
helps?
The text was updated successfully, but these errors were encountered:
Quick Summary: When destructuring a tuple a missing comma will lead the parser to correctly complain at the next token, but the message fails to communicate that a comma (
,
) is also a valid continuation of the pattern.SSCCE
Additional Details
Compiler output:
The text was updated successfully, but these errors were encountered: