[Haskell-cafe] Check a lack of a constraint?

Lana Black lanablack at amok.cc
Mon Jul 12 18:24:57 UTC 2021

Hello cafe,

Is it possible in Haskell to check a lack of a certain constraint?

For example,

foo :: C => a
foo = undefined


Here `foo` can only be compiled if called with C satisfied. How do I write the 
opposite, so that `foo` is only possible to use when C is not satisfied?

With best regards.

More information about the Haskell-Cafe mailing list