Add Show instance for MemRepr.

This commit is contained in:
Joe Hendrix 2017-11-20 15:05:13 -08:00
parent b73e2258ee
commit e62b4e4e56
No known key found for this signature in database
GPG Key ID: 8DFA5FF784098C4F

View File

@ -273,6 +273,9 @@ instance Pretty (MemRepr tp) where
pretty (BVMemRepr w BigEndian) = text "bvbe" <+> text (show w)
pretty (BVMemRepr w LittleEndian) = text "bvle" <+> text (show w)
instance Show (MemRepr tp) where
show = show . pretty
-- | Return the number of bytes this takes up.
memReprBytes :: MemRepr tp -> Integer
memReprBytes (BVMemRepr x _) = natValue x