T1900.hs:13:10: Could not deduce (Depend s0 ~ Depend s) from the context (Bug s) bound by the type signature for check :: Bug s => Depend s -> Bool at T1900.hs:13:10-36 NB: ‘Depend’ is a type function, and may not be injective The type variable ‘s0’ is ambiguous Expected type: Depend s -> Bool Actual type: Depend s0 -> Bool In the ambiguity check for: forall s. Bug s => Depend s -> Bool To defer the ambiguity check to use sites, enable AllowAmbiguousTypes In the type signature for ‘check’: check :: Bug s => Depend s -> Bool