Safe HaskellSafe

Calc

Description

A simple stack-based calculator

Synopsis

Documentation

data Cmd Source #

The supported commands of the calculator.

Constructors

Push Int 
Pop 
Add 

exec :: Cmd -> Stack Int -> Stack Int Source #

Executing a single command on a given Stack.

calc :: Stack Int -> IO () Source #

The REPL of the calculator.

main :: IO () Source #

Initialize the REPL with the empty Stack.