Export Command to separate module

This commit is contained in:
2021-11-02 18:11:23 +01:00
parent e8b94aa017
commit 4693b19bf2
4 changed files with 15 additions and 9 deletions

View File

@@ -1,7 +1,6 @@
module Instruction (
Op(..),
Instruction(..),
Command(..),
instructions,
instructionByOp,
toOp
@@ -43,10 +42,6 @@ data Instruction = Simple { op :: Op
}
deriving (Eq, Show)
data Command = Command { instr :: Instruction
, args :: [Int]
} deriving (Eq, Show)
instructions :: [Instruction]
instructions = [ Simple { op = Nop, noParams = 0, noPops = 0 }
, Simple { op = Halt, noParams = 0, noPops = 0 }