puresat-0.1: Pure Haskell SAT-solver
Safe HaskellSafe-Inferred
LanguageHaskell2010

PureSAT.Utils

Synopsis

Documentation

whenOk :: STRef s Bool -> ST s Bool -> ST s Bool Source #

whenOk_ :: ST s Bool -> ST s Bool -> ST s Bool Source #

nextPowerOf2 :: Int -> Int Source #

Next power of two.

>>> map nextPowerOf2 [-1, 0, 1, 2, 1024, 1245, 9999]
[1,1,1,2,1024,2048,16384]