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: Working too late into the night and stupidly used a type alias in the model record (without any arguments). The compiler caught the bug but error wasn't so useful (as in, I didn't know where to look when trying to fix it). Right now if you're not careful you're going to run into errors when you accidentally add a type to a record in certain cases (see below). A simple "This constructor function has no arguments" would've helped.
type SomeType=Nope|YupInt-- Throws a `I cannot find a `SomeType` variant:` error{ test =SomeType}-- Could silently fail (as it returns a function that takes an argument){ test =Yup}
Should some of these cases be disallowed?
SSCCE
Elm: 0.19.1
Browser: n/a
Operating System: MacOs Monterey 12.7.6
Additional Details
I caveat this with the fact that the Elm compiler is a godsend and has caught and helped me fix so many silly mistakes! That's so important, I've dabbled with Purescript and the repl errors are so unhelpful.
The text was updated successfully, but these errors were encountered:
Issues are reviewed in batches, so it can take some time to get a response.
Ask questions in a community forum. You will get an answer quicker that way!
If you experience something similar, open a new issue. We like duplicates.
Finally, please be patient with the core team. They are trying their best with limited resources.
badlydrawnrob
changed the title
A silly mistake but the compiler wasn't helpful
A silly mistake but the compiler wasn't helpful with type error
Sep 6, 2024
Quick Summary: Working too late into the night and stupidly used a
type alias
in the model record (without any arguments). The compiler caught the bug but error wasn't so useful (as in, I didn't know where to look when trying to fix it). Right now if you're not careful you're going to run into errors when you accidentally add atype
to a record in certain cases (see below). A simple "This constructor function has no arguments" would've helped.Should some of these cases be disallowed?
SSCCE
Additional Details
I caveat this with the fact that the Elm compiler is a godsend and has caught and helped me fix so many silly mistakes! That's so important, I've dabbled with Purescript and the repl errors are so unhelpful.
The text was updated successfully, but these errors were encountered: