brainheck-0.1.0.6: Brainh*ck interpreter in haskell
Brainheck
Contents
Description
Module with parser etc.
Synopsis
run :: Syntax Char -> IO () Source #
Evaluate syntax tree
parseBrainheck :: FilePath -> Text -> Either (ParseError (Token Text) Void) (Syntax Char) Source #
Parse and return an error or a syntax tree
data Syntax a Source #
Syntax tree for brainfuck
Constructors
Instances
Methods
showsPrec :: Int -> Syntax a -> ShowS #
show :: Syntax a -> String #
showList :: [Syntax a] -> ShowS #
project :: Syntax a0 -> Base (Syntax a0) (Syntax a0) #
cata :: (Base (Syntax a0) a -> a) -> Syntax a0 -> a #
para :: (Base (Syntax a0) (Syntax a0, a) -> a) -> Syntax a0 -> a #
gpara :: (Corecursive (Syntax a0), Comonad w) => (forall b. Base (Syntax a0) (w b) -> w (Base (Syntax a0) b)) -> (Base (Syntax a0) (EnvT (Syntax a0) w a) -> a) -> Syntax a0 -> a #
prepro :: Corecursive (Syntax a0) => (forall b. Base (Syntax a0) b -> Base (Syntax a0) b) -> (Base (Syntax a0) a -> a) -> Syntax a0 -> a #
gprepro :: (Corecursive (Syntax a0), Comonad w) => (forall b. Base (Syntax a0) (w b) -> w (Base (Syntax a0) b)) -> (forall c. Base (Syntax a0) c -> Base (Syntax a0) c) -> (Base (Syntax a0) (w a) -> a) -> Syntax a0 -> a #
embed :: Base (Syntax a0) (Syntax a0) -> Syntax a0 #
ana :: (a -> Base (Syntax a0) a) -> a -> Syntax a0 #
apo :: (a -> Base (Syntax a0) (Either (Syntax a0) a)) -> a -> Syntax a0 #
postpro :: Recursive (Syntax a0) => (forall b. Base (Syntax a0) b -> Base (Syntax a0) b) -> (a -> Base (Syntax a0) a) -> a -> Syntax a0 #
gpostpro :: (Recursive (Syntax a0), Monad m) => (forall b. m (Base (Syntax a0) b) -> Base (Syntax a0) (m b)) -> (forall c. Base (Syntax a0) c -> Base (Syntax a0) c) -> (a -> Base (Syntax a0) (m a)) -> a -> Syntax a0 #