-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Brainfuck interpreter
--   
--   This is an interpreter of the brainf*ck language, written in the pure,
--   lazy, functional language Haskell.
@package brainfuck
@version 0.1

module Language.Brainfuck.Examples
helloWorld :: String
toupper :: String
sort :: String
helloum :: String
bottles :: String

module Language.Brainfuck

-- | The complete BF language:
--   
--   <ul>
--   <li>&gt; Increment the pointer. * &lt; 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.</li>
--   </ul>
data Command
IncPtr :: Command

-- | Increment pointer by set amount
IncPtrBy :: !Int -> Command
DecPtr :: Command
IncByte :: Command

-- | Increment by a set amount
IncByteBy :: !Int -> Command
DecByte :: Command
OutputByte :: Command

-- | nesting level
JmpForward :: !Int -> Command

-- | nesting level
JmpBackward :: !Int -> Command

-- | Sets the instruction ptr to a specific value
SetIpTo :: !Int -> Command
Halt :: Command
Ignored :: Command
type Core = IOUArray Int Word8
type InstPtr = Int
type CorePtr = Int
data BF
BF :: !Core -> !CorePtr -> !InstPtr -> BF
coreSize :: Int
core :: IO Core
decode :: Char -> State Int Command
debug :: Bool
incIP :: InstPtr -> InstPtr
incCP :: CorePtr -> CorePtr
decCP :: CorePtr -> CorePtr
doCommand :: Array Int Command -> BF -> IO BF
nextJmp :: Array Int Command -> InstPtr -> (InstPtr -> InstPtr) -> Command -> InstPtr
chrToWord8 :: Char -> Word8
word8ToChr :: Word8 -> Char
updateByte :: MArray IOUArray Word8 m => BF -> (Word8 -> Word8) -> m BF
loadProgram :: String -> Array Int Command
optimize :: [Command] -> Array Int Command
execute :: Array Int Command -> Int -> BF -> IO ()
halt :: IO ()
instance Show Command
instance Eq Command
instance Show BF
