on master help sign in
Safe bitsEq
commitc3f27f73be5fa5f369ebc5c6ac71ab9941e876e9 authorBenjamin Saunders <besaunde@sfu.ca> dateThu 27 Dec 2012, 11:19 (14 years ago) parent927fd18
1 file changed+5−2
lib/Prelude/Bits.idr+5−2
lib/Prelude/Bits.idr+5−2
@@ -203,5 +203,8 @@ public
203203bitsEq : (x : Bits n) -> (y : Bits n) -> Either (x = y) (x = y -> _|_)
204204bitsEq (MkBits x) (MkBits y) =
205205 case (bitsEq' x y) of
206− 0 => Right (believe_me ())
207− _ => Left (believe_me ())
206+ 0 => Right uneq
207+ _ => Left eq
208+ where
209+ postulate uneq : {x : Bits n} -> {y : Bits n} -> x = y -> _|_
210+ postulate eq : {x : Bits n} -> {y : Bits n} -> x = y