brainfuck-0.1.0.2: Brainfuck interpreter

Safe HaskellNone
LanguageHaskell98

Language.Brainfuck

Synopsis

Documentation

data Command Source

The complete BF language:

  • > Increment the pointer.
  • < Decrement the pointer.
  • + Increment the byte at the pointer.
  • - Decrement the byte at the pointer.
  • . Output the byte at the pointer.
  • , Input a byte and store it in the byte at the pointer.
  • [ Jump forward past the matching ] if the byte at the pointer is zero.
  • ] Jump backward to the matching [ unless the byte at the pointer is zero.

Constructors

IncPtr 
IncPtrBy !Int

Increment pointer by set amount

DecPtr 
IncByte 
IncByteBy !Int

Increment by a set amount

DecByte 
OutputByte 
JmpForward !Int

nesting level

JmpBackward !Int

nesting level

SetIpTo !Int

Sets the instruction ptr to a specific value

Halt 
Ignored 

Instances

data BF Source

Constructors

BF !Core !CorePtr !InstPtr 

Instances

halt :: IO () Source