Type class trickery to eliminate the FFI boilerplate.

Hi! Please accept my type class trickery to eliminate the FFI boilerplate. One of the instances is suspect though.

I have this:

class Convertible a b | a -> b
instance Convertible (IO NodeID) (Node v)

This means we have both:

instance Convertible (IO NodeID) (Node Int)
instance Convertible (IO NodeID) (Node String)

Doesn't it violate the functional dependency guarantees?