-
Notifications
You must be signed in to change notification settings - Fork 41
Closed
Description
Currently ForeignError is quite limiting in what kinds of error a read operation can produce, that is, it covers type errors, but it only covers a parse error (say when parsing a String) IF it's parsing JSON.
In my case, I have a Type field which is parsed from a simple Haskell style string "Concrete -> Concrete". If the parse fails for any reason there isn't a ForeignError that covers this case, as it's not a type error but a syntax error. JSON gets special treatment in this case, but perhaps the JSONError should be generalized to cover other cases?
It seems like TypeMismatch isn't going to be useful in terms of implementing new Foreign instances because all the primitive types are already covered by the Foreign library.
Metadata
Metadata
Assignees
Labels
No labels