tvl-depot/website
William Carroll 3c8bfe85c9 Prefer type alias to type
Elm reminds me of Haskell. In fact, I'm using `haskell-mode` (for now) in Emacs
to write my Elm code, and it works reliably. I'm not writing a Haskell app, but
if I were, I would define my application Model with the following Haskell code:

```haskell
data Model = Model { whitelistedChords :: [Theory.Chord]
                   , selectedChord :: Theory.Chord
                   , isPaused :: Bool
                   , tempo :: Int
                   }
```

When I first modelled my application state, I did something similar. After
reading more Elm examples of SPAs, I see that people prefer using type aliases
to define records. As far as I know, you cannot do this in Haskell; I believe
all types are "tagged" (something about "nominal typing" comes to mind). Anyhow,
Elm isn't Haskell; Haskell has cool features like type classes; Elm has cool
features like human-readable error messages and exhaustiveness checking for
cases. I love Haskell, and I love Elm, and you didn't ask.

Anyhow, this commit refactors my records as type aliases instead of types. I
think the resulting code is more readable and ergonomic.
2020-04-11 16:50:02 +01:00
..
blog Fix spelling errors in cell-phone-experiment blog 2020-04-03 17:20:13 +01:00
days-of-week-habits Digitize daily habits 2020-03-27 18:26:27 +00:00
goals Change srcs to src for website.goals derivation 2020-03-27 16:02:44 +00:00
habitgarden Prototype my digital habits journal 2020-03-30 20:28:38 +01:00
habits Add a README to //website/habits 2020-04-05 16:31:46 +01:00
learn Run Prettier across projects 2020-03-27 10:59:50 +00:00
sandbox Prefer type alias to type 2020-04-11 16:50:02 +01:00
default.nix Publish habits as a webpage 2020-03-27 16:02:44 +00:00
index.html Publish habits as a webpage 2020-03-27 16:02:44 +00:00
README.md Add README to //website 2020-04-05 16:29:17 +01:00

wpcarro.dev

https://wpcarro.dev is my personal website. I expose a few subdomains, one of which you are probably visiting right now, git.wpcarro.dev. Here are some of the others:

  • blog.wpcarro.dev: My personal blog
  • learn.wpcarro.dev: Teaching others to code
  • sandbox.wpcarro.dev: Where I deploy some pet projects and code sketches

Visit https://wpcarro.dev for a sitemap.