-
Notifications
You must be signed in to change notification settings - Fork 16
Open
Description
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 | Yup Int
-- 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.
Metadata
Metadata
Assignees
Labels
No labels