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
{{ message }}
This repository was archived by the owner on Jan 29, 2024. It is now read-only.
Here, it's clear from reading the code that action.type has a defined set of expected values.
Hegel does infer from usage that action must have a type property.
But it does not infer that the type is a string - although it's clear to a person familiar with pattern matching that, not only is a string property expected, but there is also an expected set of constant string types.
I'm sure this is non-trivial, but I'm wondering if it's even possible and whether it would make sense? 🙂
Would it possible (and would it make sense) to add inference for pattern matching?
For example:
Here, it's clear from reading the code that
action.typehas a defined set of expected values.Hegel does infer from usage that
actionmust have atypeproperty.But it does not infer that the
typeis a string - although it's clear to a person familiar with pattern matching that, not only is a string property expected, but there is also an expected set of constant string types.I'm sure this is non-trivial, but I'm wondering if it's even possible and whether it would make sense? 🙂