ekmett / ersatz

A monad for interfacing with external SAT solvers
Other
62 stars 15 forks source link

generalilze types of Counting functions (and sumBits)? #54

Open jwaldmann opened 3 years ago

jwaldmann commented 3 years ago

I am using ersatz's Boolean typeclass in https://hackage.haskell.org/package/obdd (to get names for Boolean operations)

I want to also use Ersatz.Counting.exactly (etc.) but they are monorphic ([Bit] -> Bit) while the type could be Boolean b=> [b] -> b.

Current implementation uses sumBit :: Foldable t => t Bit -> Bits. Could that be olymorphic as well?

Well, then Bits must be [b] (or a newtype).