Based on this question, in this code
data Promise a b = Pending (a -> b) | Resolved b | Broken instance Functor (Promise x) where fmap f (Pending g)
You are only missing the equations for Resolved and Broken. The only reasonable implementation I can think of is
Resolved
Broken
fmap f (Resolved x) = Resolved (f x) fmap _ Broken = Broken
Other than that, your code is fine.