aoc2018-0.1.0.0: Advent of Code 2018 solutions and auto-runner

Safe HaskellNone
LanguageHaskell2010

AOC.Common.Elfcode

Contents

Synopsis

Documentation

type Mem s = MVector 6 s Int Source #

data Instr Source #

Constructors

I 

Fields

Instances
Eq Instr Source # 
Instance details

Defined in AOC.Common.Elfcode

Methods

(==) :: Instr -> Instr -> Bool #

(/=) :: Instr -> Instr -> Bool #

Ord Instr Source # 
Instance details

Defined in AOC.Common.Elfcode

Methods

compare :: Instr -> Instr -> Ordering #

(<) :: Instr -> Instr -> Bool #

(<=) :: Instr -> Instr -> Bool #

(>) :: Instr -> Instr -> Bool #

(>=) :: Instr -> Instr -> Bool #

max :: Instr -> Instr -> Instr #

min :: Instr -> Instr -> Instr #

Show Instr Source # 
Instance details

Defined in AOC.Common.Elfcode

Methods

showsPrec :: Int -> Instr -> ShowS #

show :: Instr -> String #

showList :: [Instr] -> ShowS #

data OpCode Source #

Instances
Bounded OpCode Source # 
Instance details

Defined in AOC.Common.Elfcode

Enum OpCode Source # 
Instance details

Defined in AOC.Common.Elfcode

Eq OpCode Source # 
Instance details

Defined in AOC.Common.Elfcode

Methods

(==) :: OpCode -> OpCode -> Bool #

(/=) :: OpCode -> OpCode -> Bool #

Ord OpCode Source # 
Instance details

Defined in AOC.Common.Elfcode

Show OpCode Source # 
Instance details

Defined in AOC.Common.Elfcode

execOp :: (PrimMonad m, PrimState m ~ s) => Instr -> Mem s -> m (Maybe Int) Source #

runECProg :: Finite 6 -> ECProg -> IMem -> ([Int], IMem) Source #

Optimizers

peep Source #

Arguments

:: Maybe Int

expected A

-> Maybe Int

expected B

-> Maybe (Finite 6)

expected C

-> Peephole Instr 

Parsing