Run a script automatically on sunrise and sunset
Find a file
2024-08-16 06:41:19 -07:00
app refactor: complete modularization 2024-08-01 20:15:32 -07:00
.gitignore deps(dev): switch to nix 2024-08-16 06:28:52 -07:00
CHANGELOG.md initial commit 2024-07-13 19:50:43 -07:00
flake.lock deps(dev): switch to nix 2024-08-16 06:28:52 -07:00
flake.nix deps(dev): switch to nix 2024-08-16 06:28:52 -07:00
LICENSE initial commit 2024-07-13 19:50:43 -07:00
README.md docs: add readme 2024-08-16 06:41:19 -07:00
suntheme.cabal deps(dev): switch to nix 2024-08-16 06:28:52 -07:00

Suntheme

runs a script on sunrise and sunset, written in pure haskell.

You may be wondering how a program written in Haskell, the purely functional programming language, could possibly act on the real world by running a so-called "script".

It's simple. We take in the entire World as an input to a pure function, the IO Monad. It then maps the original World to the changed World, with our desired IO actions carefully applied.

From the second perspective, an IO action transforms the whole world. IO actions are actually pure, because they receive a unique world as an argument and then return the changed world.

See this for more information.