-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Labels
Description
Consider the following sample ADT:
data Sample
= Foo
| Bar Int String
| Bazand a wrongly encoded JSON:
{
"tag" : "Bar",
"value": [1, true]
}It should produce an error similar to:
(Named "Sample" (Named "at case `Bar`" (AtIndex 1 (TypeMismatch "...."))))Looking at it now, ideally JsonDecodeError would have an additional constructor AtCase.
@garyb Would you be up for extending JsonDecodeError?