THE PHOTON SPHERE

Haskell development environment on Android phone

Install a full Haskell development environment (including hpack and cabal) on your Android phone. The command prompt runs via AnLinux + Termux.

F-Droid

Install F-Droid from f-droid.org (follow instructions).

AnLinux + Termux

First install the Termux package and then the AnLinux package (both via F-Droid) and select a distribution in AnLinux (I use Debian).

Debian packages

A number of Debian packages are required and useful for your Haskell development environment. To install them start up Debian Linux under Termux (per instructions with AnLinux) and type the following commands:

apt-get update
apt-get install build-essential curl vim-nox silversearcher-ag git ghc cabal-install hpack hlint stylish-haskell libghc-zlib-dev

Demonstration

Use the commands below to get and build my Paperspan export (HTML) to Instapaper import (CSV) convertor – maridonkers/paperspan2instapaper.

git clone https://github.com/maridonkers/paperspan2instapaper.git
cd paperspan2instapaper
cabal new-update
hpack
cabal new-build
cp folders-example.yaml folders.yaml
cabal new-run . -- yourpaperspanexportfile.html

Notes:

  • use the cabal new- commands (e.g. cabal new-update, cabal new-build, cabal new-run) because the regular ones appear to be not working;
  • depending on your phone the cabal new-update and cabal new-build may take a while to complete.

Screen dump