unlambda-0.1.4.2: Unlambda interpreter

Safe Haskell | Safe-Inferred
Language | Haskell98

Language.Unlambda

# Documentation

data Exp Source #

Constructors

App Exp Exp |
K |
K1 Exp |
S |
S1 Exp |
S2 Exp Exp |
I |
V |
C |
Cont (Cont Exp) |
D |
D1 Exp |
Dot Char |
E |
At |
Ques Char |
Pipe |

#### Instances

Instances details

Show Exp Source # |
Instance details Defined in Language.Unlambda Methods showsPrec :: Int -> Exp -> ShowS Source # show :: Exp -> String Source # showList :: [Exp] -> ShowS Source #

sh :: Exp -> String -> String Source #

newtype Eval a Source #

Constructors

Eval ((Maybe Char, Int) -> Cont a -> IO Exp) |

#### Instances

Instances details

Applicative Eval Source # |
Instance details Defined in Language.Unlambda Methods pure :: a -> Eval a Source # (<*>) :: Eval (a -> b) -> Eval a -> Eval b Source # liftA2 :: (a -> b -> c) -> Eval a -> Eval b -> Eval c Source # (*>) :: Eval a -> Eval b -> Eval b Source # (<*) :: Eval a -> Eval b -> Eval a Source #
Functor Eval Source # |
Instance details Defined in Language.Unlambda Methods fmap :: (a -> b) -> Eval a -> Eval b Source # (<$) :: a -> Eval b -> Eval a Source #
Monad Eval Source # |
Instance details Defined in Language.Unlambda Methods (>>=) :: Eval a -> (a -> Eval b) -> Eval b Source # (>>) :: Eval a -> Eval b -> Eval b Source # return :: a -> Eval a Source #

type Cont a = (Maybe Char, Int) -> a -> IO Exp Source #

currentChar :: Eval (Maybe Char) Source #

setCurrentChar :: Maybe Char -> Eval () Source #

io :: IO a -> Eval a Source #

throw :: ((Maybe Char, Int) -> t -> IO Exp) -> t -> Eval a Source #

exit :: Exp -> Eval a Source #

callCC :: (((Maybe Char, Int) -> a -> IO Exp) -> Eval a) -> Eval a Source #

step :: Eval () Source #

eval :: Exp -> Eval Exp Source #

apply :: Exp -> Exp -> Eval Exp Source #