/usr/share/doc/libghc-brainfuck-doc/html/brainfuck.txt is in libghc-brainfuck-doc 0.1.0.3-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 | -- 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.0.3
module Language.Brainfuck.Examples
helloWorld :: String
bottles :: String
helloum :: String
sort :: String
toupper :: String
module Language.Brainfuck
-- | The complete BF language:
--
-- <ul>
-- <li>> Increment the pointer.</li>
-- <li>< Decrement the pointer.</li>
-- <li>+ Increment the byte at the pointer.</li>
-- <li>- Decrement the byte at the pointer.</li>
-- <li>. Output the byte at the pointer.</li>
-- <li>, Input a byte and store it in the byte at the pointer.</li>
-- <li>[ Jump forward past the matching ] if the byte at the pointer is
-- zero.</li>
-- <li>] 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 GHC.Classes.Eq Language.Brainfuck.Command
instance GHC.Show.Show Language.Brainfuck.Command
instance GHC.Show.Show Language.Brainfuck.BF
|