I've been struggling to debug unexpected Partial constraints. I'll chime in on a related issue about a vague message related to binding groups. But at the root Partial acts like IO instead of Eff. There's no way to ascertain which parts of a type contributed to the whole type being inexhaustive. A naive example is Partial => Tuple (Mabye a) (List a). Was Maybe or List missing a case? Regardless unsafePartial clears them both. I initially thought it'd make APIs nicer like Data.Array.Partial.head. But any function calling head also becomes Partial if not handled with no way to express why
using types (just documentation or a descriptive crashWith). Partial feels like an implicit Either a a flagging whether exhaustivity checking worked in a previous context without compiler verification what's left. I was also surprised it only works at the top level as opposed to inside a where. I don't know how to improve the design with parameters or preferably rows but wanted to raise it for discussion.
I've been struggling to debug unexpected
Partialconstraints. I'll chime in on a related issue about a vague message related to binding groups. But at the rootPartialacts likeIOinstead ofEff. There's no way to ascertain which parts of a type contributed to the whole type being inexhaustive. A naive example isPartial => Tuple (Mabye a) (List a). WasMaybeorListmissing a case? RegardlessunsafePartialclears them both. I initially thought it'd make APIs nicer likeData.Array.Partial.head. But any function callingheadalso becomesPartialif not handled with no way to express using types (just documentation or a descriptivecrashWith).Partialfeels like an implicitEither a aflagging whether exhaustivity checking worked in a previous context without compiler verification what's left. I was also surprised it only works at the top level as opposed to inside awhere. I don't know how to improve the design with parameters or preferably rows but wanted to raise it for discussion.