mirror of
https://github.com/GaloisInc/macaw.git
synced 2024-11-24 00:42:28 +03:00
Add Show instance for MemRepr.
This commit is contained in:
parent
b73e2258ee
commit
e62b4e4e56
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user