implemented isValid for Word16
This commit is contained in:
@@ -47,7 +47,14 @@ instance Hamming Word16 where
|
||||
, ( 0x0001, 0xfffe )
|
||||
]
|
||||
|
||||
isValid = undefined
|
||||
isValid code = not $ any (\mask -> oddParity $ code .&. mask)
|
||||
[ 0xaaaa
|
||||
, 0xcccc
|
||||
, 0xf0f0
|
||||
, 0xff00
|
||||
, 0xffff
|
||||
]
|
||||
|
||||
correctErrors = undefined
|
||||
|
||||
setCheckBit :: (Num a, Bits a) => a -> (a, a) -> a
|
||||
|
||||
Reference in New Issue
Block a user