| Ah! I just needed
| instance ForeignRes (Ptr a) b => ForeignRes (ThrowNull (Ptr a)) b
| but for GHC it's undecidable. I had to use
| instance ForeignRes (ThrowNull (Ptr a)) (Ptr a)
| which is theoretically less general, although in practice it suffices.
|
| It's annoying that an analogous variant works:
| instance (Num a, ForeignRes a b) => ForeignRes (Throw_1 a) b
| only because the type is not concrete.
|
| As I understand it, this rule would allow it. Please, can GHC be
| changed to support that?
You mean "change to support it *without* saying
-fallow-undecideable-instances"?
Allowing undecideable instances is just a way to make the programmer
undertake the proof obligation. Since you are sure it's ok, you can just
use the flag. Or am I missing something?
Simon