Home

Awesome

FPSheet

A Spreadsheet program with Haskell as the scripting language

The prototype was written in C, it can be tried out in the c-prototype branch. I am currently rewriting the tool in Haskell, which I am doing in this master branch.

Alt text

FPSheet is a spreadsheet program, where the scripting language for computing cell's values from formulas runs Haskell internally. This arguably provides a more uniform experience than what is provided by the scripting languages of standard spreadsheet programs. Note: this README currently assumes some familiarity from the reader with ghc's ghci tool.

The tool maintains a Haskell Interpreter session in the background. When a cell is defined or edited, a unique variable is defined or redefined inside this session. For example, if cell abd124 is edited to: "45", FPSheet sends the following to the interpreter session: "let abd124 = 45". Similarly, if cell a4 is edited to: "a5 * 10", FPSheet sends the following to the ghci session: "let a4 = a5 * 10".

Interestingly, since Haskell is lazily evaluated, and since Haskell regards function values as first class citizens, functions can be defined by cells. Any other cell can then apply these functions simply by referring to cells.

Installation

Run: stack install

Usage

Run: stack exec FPSheet-exe

The program has vim-like modes:

While in normal mode, press:

TODOs