# Hailstorm : A Statically-Typed, Purely Functional Language for IoT Applications

arXiv: https://arxiv.org/abs/2105.13468 · HTML: https://mlsanity.com/paper/2105.13468/

## Key facts

- Cited by 1 papers in the map (data through 14 Oct 2026).
- Builds on 2 of its 67 references that are in the map.
- First posted on arXiv 27 May 2021.

## Builds on (most cited first, 2 of 2)

- [Vehicle Platooning Simulations with Functional Reactive Programming](https://mlsanity.com/paper/1803.10383/) (2018)
- [Juniper: A Functional Reactive Programming Language for the Arduino](https://mlsanity.com/paper/1911.12932/) (2019)

## Built on by (most cited first, 1 of 1)

- [Higher-Order Concurrency for Microcontrollers](https://mlsanity.com/paper/2108.07805/) (2021)

## Abstract (arXiv)

With the growing ubiquity of Internet of Things(IoT), more complex logic is being programmed on resource-constrained IoT devices, almost exclusively using the C programming language. While C provides low-level control over memory, it lacks a number of high-level programming abstractions such as higher-order functions, polymorphism, strong static typing, memory safety, and automatic memory management. We present Hailstorm, a statically-typed, purely functional programming language that attempts to address the above problem. It is a high-level programming language with a strict typing discipline. It supports features like higher-order functions, tail-recursion, and automatic memory management, to program IoT devices in a declarative manner. Applications running on these devices tend to be heavily dominated by I/O. Hailstorm tracks side effects likeI/O in its type system using resource types. This choice allowed us to explore the design of a purely functional standalone language, in an area where it is more common to embed a functional core in an imperative shell. The language borrows the combinators of arrowized FRP, but has discrete-time semantics. The design of the full set of combinators is work in progress, driven by examples. So far, we have evaluated Hailstorm by writing standard examples from the literature (earthquake detection, a railway crossing system and various other clocked systems), and also running examples on the GRiSP embedded systems board, through generation of Erlang.
