intcode-0.4.0.0: Advent of Code 2019 intcode interpreter
Copyright(c) Eric Mertens 20192020
LicenseISC
Maintaineremertens@gmail.com
Safe HaskellSafe
LanguageHaskell2010

Intcode.Step

Description

This module advances a Machine by interpreting the opcode at the current program counter.

Synopsis

Documentation

data Step Source #

Result of small-step semantics.

Constructors

Step !Machine

update machine without output

StepOut !Int !Machine

update machine with output

StepIn (Int -> Machine)

machine blocked waiting for input

StepHalt

halt

StepFault

bad instruction

Instances

Instances details
Show Step Source # 
Instance details

Defined in Intcode.Step

Methods

showsPrec :: Int -> Step -> ShowS #

show :: Step -> String #

showList :: [Step] -> ShowS #

step :: Machine -> Step Source #

Small-step semantics of virtual machine.