jaskell-0.1.0.0: Stack-based concatenative language embedded in Haskell
Copyright(c) Owen Bechtel 2023
LicenseMIT
Maintainerombspring@gmail.com
Stabilityexperimental
Safe HaskellSafe-Inferred
LanguageHaskell2010

Jaskell

Description

 
Synopsis

Running programs

run :: (() -> t) -> t Source #

Run a direct Jaskell program on an empty stack.

runOn :: s -> (s -> t) -> t Source #

Run a direct Jaskell program on the given stack.

runK :: Kleisli m () t -> m t Source #

Run a monadic Jaskell program on an empty stack.

runKOn :: s -> Kleisli m s t -> m t Source #

Run a monadic Jaskell program on the given stack.

Stack utilities

push :: Arrow arr => a -> arr s (s, a) Source #

Push a value.

liftS :: Arrow arr => (a -> b) -> arr (s, a) (s, b) Source #

Apply a function to the top value.

liftS2 :: Arrow arr => (a -> b -> c) -> arr ((s, a), b) (s, c) Source #

Apply a function to the top two values.

pushM :: Functor m => m a -> Kleisli m s (s, a) Source #

Perform a monadic action and push the result.

popM :: Functor m => (a -> m ()) -> Kleisli m (s, a) s Source #

Pop the top value and feed it to a monadic action.

liftSM :: Functor m => (a -> m b) -> Kleisli m (s, a) (s, b) Source #

Pop the top value, feed it to a monadic action, and push the result.