Small changes to align with hapstone (Haskell bindings for Capstone)

Enums now derive bounded and made use of Applicative in Utils module
This commit is contained in:
Adrian Herrera
2016-04-09 00:13:25 +10:00
parent 023e4375d0
commit 0a3f83a20c
10 changed files with 18 additions and 17 deletions

View File

@@ -24,6 +24,6 @@ import Unicorn.Internal.Core (Reg)
omit (UC_ARM_REG_INVALID,
UC_ARM_REG_ENDING)
with prefix="UC_ARM_REG_"
deriving (Show, Eq) #}
deriving (Show, Eq, Bounded) #}
instance Reg Register

View File

@@ -24,6 +24,6 @@ import Unicorn.Internal.Core (Reg)
omit (UC_ARM64_REG_INVALID,
UC_ARM64_REG_ENDING)
with prefix="UC_ARM64_REG_"
deriving (Show, Eq) #}
deriving (Show, Eq, Bounded) #}
instance Reg Register

View File

@@ -24,6 +24,6 @@ import Unicorn.Internal.Core (Reg)
omit (UC_M68K_REG_INVALID,
UC_M68K_REG_ENDING)
with prefix="UC_M68K_REG_"
deriving (Show, Eq) #}
deriving (Show, Eq, Bounded) #}
instance Reg Register

View File

@@ -56,6 +56,6 @@ import Unicorn.Internal.Core (Reg)
omit (UC_MIPS_REG_INVALID,
UC_MIPS_REG_ENDING)
with prefix="UC_MIPS_REG_"
deriving (Show, Eq) #}
deriving (Show, Eq, Bounded) #}
instance Reg Register

View File

@@ -24,6 +24,6 @@ import Unicorn.Internal.Core (Reg)
omit (UC_SPARC_REG_INVALID,
UC_SPARC_REG_ENDING)
with prefix="UC_SPARC_REG_"
deriving (Show, Eq) #}
deriving (Show, Eq, Bounded) #}
instance Reg Register

View File

@@ -52,7 +52,7 @@ instance Storable Mmr where
omit (UC_X86_REG_INVALID,
UC_X86_REG_ENDING)
with prefix="UC_X86_REG_"
deriving (Show, Eq) #}
deriving (Show, Eq, Bounded) #}
instance Reg Register
@@ -62,4 +62,4 @@ instance Reg Register
omit (UC_X86_INS_INVALID,
UC_X86_INS_ENDING)
with prefix="UC_X86_INS_"
deriving (Show, Eq) #}
deriving (Show, Eq, Bounded) #}