From: Lucian Mogosanu Date: Fri, 19 Dec 2014 14:55:44 +0000 (+0200) Subject: Z80: ISA: Add Show instances for types X-Git-Url: https://git.mogosanu.ro/?a=commitdiff_plain;h=60950d7be14eca7083a91abfaed72a9e4d2e39e9;p=z80.git Z80: ISA: Add Show instances for types --- diff --git a/src/Z80/ISA.hs b/src/Z80/ISA.hs index b789f71..4d00c23 100644 --- a/src/Z80/ISA.hs +++ b/src/Z80/ISA.hs @@ -7,13 +7,13 @@ import Data.Int data Reg = B | C | D | E | H | L | PHL | A deriving (Show, Eq) -- reg pairs specified in the z80 manual -data BC = BC -data DE = DE -data HL = HL -data SP = SP -data AF = AF -data IX = IX -data IY = IY +data BC = BC deriving Show +data DE = DE deriving Show +data HL = HL deriving Show +data SP = SP deriving Show +data AF = AF deriving Show +data IX = IX deriving Show +data IY = IY deriving Show -- sets of reg pairs used in the z80 manual data RegPair a b c d = R1 a | R2 b | R3 c | R4 d deriving (Show, Eq) @@ -30,6 +30,7 @@ data ArithSpec = | AOp_PHL | AOp_PIX Int8 | AOp_PIY Int8 + deriving Show -- spec for shift and rotate instructions data SRSpec = @@ -37,6 +38,7 @@ data SRSpec = | SROp_PHL | SROp_PIX Int8 | SROp_PIY Int8 + deriving Show -- spec for bitwise instructions data BitwiseSpec = @@ -44,6 +46,7 @@ data BitwiseSpec = | BOp_PHL | BOp_PIX Int8 | BOp_PIY Int8 + deriving Show -- condition codes for jump/call instructions data Cond = @@ -55,6 +58,7 @@ data Cond = | CParityEven | CSignPositive | CSignNegative + deriving Show -- instructions data Instruction = @@ -216,3 +220,4 @@ data Instruction = | OUTD | OUTDR | IllegalInstruction String + deriving Show