Commits

Iago Abal committed 97cc391

A few haddock comments and minor clean-up
#cleanup

  • Participants
  • Parent commits dcb3159
  • Tags v0.2.2

Comments (0)

Files changed (2)

File Data/BitVector.hs

 ----------------------------------------------------------------------
 --- Test
 
+-- | Test if the signed value of a bit-vector is a natural number.
 isNat :: BV -> Bool
-isNat a = signumI(a) >= (0::Integer)
+isNat a = int(a) >= 0
 
+-- | Test if the signed value of a bit-vector is a positive number.
 isPos :: BV -> Bool
-isPos a = signumI(a) > (0::Integer)
+isPos a = int(a) > 0
 
 ----------------------------------------------------------------------
 --- Comparison
   signum u = bitVec 2 $ signum $ int u
   fromInteger i = bitVec (integerWidth i) i
 
+-- | Bit-vector 'signum' as an 'Integral'.
 signumI :: Integral a => BV -> a
 signumI = fromInteger . signum . int
 

File Properties.hs

 main :: IO ()
 main = $(defaultMainGenerator)
 
+-- * Generators
+
 c_MAX_SIZE :: Int
 c_MAX_SIZE = 8192