All Projects → alexanderwasey → stupid-computer

alexanderwasey / stupid-computer

Licence: MIT license
A understandable Haskell tracer.

Programming Languages

haskell
3896 projects

Projects that are alternatives of or similar to stupid-computer

Schematic
type-safe JSON spec and validation tool
Stars: ✭ 81 (+523.08%)
Mutual labels:  ghc
Haskell Ghc Illustrated
haskell ghc-illustrated
Stars: ✭ 218 (+1576.92%)
Mutual labels:  ghc
zsh-haskell
ghc and cabal completion for zsh shell
Stars: ✭ 18 (+38.46%)
Mutual labels:  ghc
Ghc Grin
GRIN backend for GHC
Stars: ✭ 123 (+846.15%)
Mutual labels:  ghc
All Hies
Cached Haskell IDE Engine Nix builds for all GHC versions
Stars: ✭ 201 (+1446.15%)
Mutual labels:  ghc
Haskell Symbol Search Cheatsheet
Haskell/GHC symbol search cheatsheet
Stars: ✭ 243 (+1769.23%)
Mutual labels:  ghc
Lazy evaluation
haskell lazy evaluation illustrated
Stars: ✭ 58 (+346.15%)
Mutual labels:  ghc
ghc-stack
Hacking GHC's Stack for Fun and Profit (featuring The Glorious Haskell Debugger v0.0.1 Pre-alpha)
Stars: ✭ 69 (+430.77%)
Mutual labels:  ghc
Vscode Ghc Simple
Simple GHC (Haskell) integration for VSCode
Stars: ✭ 214 (+1546.15%)
Mutual labels:  ghc
smuggler2
Minimise haskell imports, make exports explicit
Stars: ✭ 18 (+38.46%)
Mutual labels:  ghc
Asterius
A Haskell to WebAssembly compiler
Stars: ✭ 1,799 (+13738.46%)
Mutual labels:  ghc
Haskell Gi
Generate Haskell bindings for GObject-Introspection capable libraries
Stars: ✭ 190 (+1361.54%)
Mutual labels:  ghc
Ghcup
DEPRECATED IN FAVOR OF haskell/ghcup-hs
Stars: ✭ 249 (+1815.38%)
Mutual labels:  ghc
Haste Compiler
A GHC-based Haskell to JavaScript compiler
Stars: ✭ 1,429 (+10892.31%)
Mutual labels:  ghc
haskell-hot-swap
Hot swapping compiled code while keeping a websocket connection open
Stars: ✭ 24 (+84.62%)
Mutual labels:  ghc
Ghc Core Literature Review
Literature review of GHC's Core language, System FC
Stars: ✭ 67 (+415.38%)
Mutual labels:  ghc
Haskell Ide Engine
The engine for haskell ide-integration. Not an IDE
Stars: ✭ 2,433 (+18615.38%)
Mutual labels:  ghc
Pi-Pool
Cardano Stakepool on Raspberry Pi
Stars: ✭ 204 (+1469.23%)
Mutual labels:  ghc
stm
Software Transactional Memory
Stars: ✭ 74 (+469.23%)
Mutual labels:  ghc
vabal
cabal in Valle
Stars: ✭ 43 (+230.77%)
Mutual labels:  ghc

stupid-computer

Break down Haskell programs and execute them step by step!

A Haskell tracer, designed with readability in mind.

For instance given the definition of the sum function:

sum :: [Int] -> Int 
sum (x:xs) = x + (sum xs)
sum [] = 0

And an expression to evaluate:

sum [1,2,3,4]

A trace of the execution can be shown by the Stupid Computer as follows:

      sum [1, 2, 3, 4]
   =  1 + sum [2,3,4]
   =  1 + 2 + sum [3,4]
   =  1 + 2 + 3 + sum [4]
   =  1 + 2 + 3 + 4 + sum []
   =  1 + 2 + 3 + 4 + 0
   =  1 + 2 + 3 + 4
   =  1 + 2 + 7
   =  1 + 9
   =  10

To download and install run the following commands in your terminal.

git clone https://github.com/alexanderwasey/stupid-computer.git

cd stupid-computer

stack install

And then run the sum examples with

stupid-computer examples/sum.hs , followed by sum [1, 2, 3, 4]

For help run stupid-computer --help

Source can be found at https://github.com/alexanderwasey/stupid-computer

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].