Programming languages enthusiast. Author of Learn Type Driven Development: https://www.packtpub.com/application-development/learn-type-driven-development
Hmm, I still don't see how that could happen though 🤔 at some point in the code we would call icons(something) where something is a polymorphic variant tag. At that point the typechecker would step in to point out if you called it with icons(`arrowDown) which is not handled by the icons function (assuming the typo in its definition). You wouldn't be calling the icons function with a string, it's not stringly typed.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hmm, I still don't see how that could happen though 🤔 at some point in the code we would call
icons(something)
wheresomething
is a polymorphic variant tag. At that point the typechecker would step in to point out if you called it withicons(`arrowDown)
which is not handled by theicons
function (assuming the typo in its definition). You wouldn't be calling theicons
function with a string, it's not stringly typed.