Declaring Data Management Applications with Herculus

Moritz Drexl

Haskell eXchange 2017

Herculus

  • Work on relational data
  • in a spreadsheet-like user interface
  • with a typed language like Haskell

Motivation: Spreadsheets

Why people like them

  • No boilerplate (only business logic)
  • Declarative (= A2 + B2)
  • Data focused (WYSIWYG)

Why they don't scale

  • No types / static analysis
  • Not enough structure

Herculus: Concept

A B C
3 2 5
1 3 4

C

Type: Integer

Formula:

$A + $B

Table: T

  • Formulas are statically typed
  • Implied computation graph for all rows

Herculus: Concept

Month Client Items
Sep 2017 John 5 items
Oct 2017 John 2 items

Items

Type: List (Row #Items)

Formula:

incl : Row #Items -> Boolean
incl i =
     within $Month i.Date
  && i.Client == $Client

filter incl #Items
Date Client Amount
9/14/17 John 49.50
... ... ...

Table: Invoices

Table: Items

Example

(live)

Herculus: Future

  • Open source
  • Planned features
    • Column type migration
    • Interface external data sources
    • Undo/redo
    • Data validation
    • Collaboration
    • ...
  • Conceptual challenges
    • How to deal with lots of data / expensive computation
    • Improve usability for entering data

Questions?

Herculus Haskell eXchange

By Moritz Drexl

Herculus Haskell eXchange

  • 550