Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Build and deploy

on:
push:
branches: main
branches: [ main ]

@jhrcek jhrcek Jun 3, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

vscode complaining about this file not being schema compliant (branches needs to be an array of strings, not a string)

pull_request:

permissions:
Expand All @@ -15,14 +15,14 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to shut up github warnings about old versions of nodejs


- uses: cachix/install-nix-action@v31
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}

- name: Install cachix
uses: cachix/cachix-action@v16
uses: cachix/cachix-action@v17
with:
name: haskell-miso-cachix

Expand All @@ -36,7 +36,7 @@ jobs:
run: nix develop .#ghcjs --command bash -c "make js"

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
uses: actions/upload-pages-artifact@v5
with:
path: ./public

Expand All @@ -47,7 +47,7 @@ jobs:

- name: Build WASM using GHCup
run: |
make ghcup-build
make ghcup-build

deploy:
if: github.ref == 'refs/heads/main'
Expand All @@ -62,5 +62,4 @@ jobs:
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

uses: actions/deploy-pages@v5
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
🍱 miso-sampler
🍱 miso-sampler
====================

This project contains a sample [miso](https://github.com/dmjio/miso) application with scripts to
This project contains a sample [miso](https://github.com/dmjio/miso) application with scripts to
develop against vanilla GHC and to compile to Web Assembly or JavaScript.

### Source
Expand All @@ -11,14 +11,14 @@ View [source](https://github.com/haskell-miso/miso-sampler/blob/main/app/Main.hs
### Install Nix (w/ flakes enabled)

```bash
# Install nix
# Install nix
curl -L https://nixos.org/nix/install | sh

# Enable flakes
echo 'experimental-features = nix-command flakes' >> ~/.config/nix/nix.conf
```

> [!TIP]
> [!TIP]
> Miso requires installing [nix](https://nixos.org) with [Nix Flakes](https://wiki.nixos.org/wiki/Flakes) enabled.

### Browser mode 🔥
Expand All @@ -31,8 +31,8 @@ $ nix develop .#wasm --command bash -c 'make repl'

```
Preprocessing executable 'app' for app-0.1.0.0...
GHCi, version 9.12.2.20250924: https://www.haskell.org/ghc/ :? for help
Open http://127.0.0.1:8080/main.html or import http://127.0.0.1:8080/main.js to boot ghci
GHCi, version 9.14.1.20260330: https://www.haskell.org/ghc/ :? for help
Open http://127.0.0.1:8080/main.html or import("http://127.0.0.1:8080/main.js") to boot ghci
```

Paste the URL in your browser. Doing so will cause assets to transfer; you can inspect the network tab, but do not refresh the page. The REPL will load in the terminal
Expand Down Expand Up @@ -80,7 +80,7 @@ $ nix develop .#wasm --command bash -c 'make watch'

### Development

Call `nix develop` to enter a shell with [GHC 9.12.2](https://haskell.org/ghc)
Call `nix develop` to enter a shell with [GHC 9.14.1](https://haskell.org/ghc)

```bash
$ nix develop .#wasm
Expand Down Expand Up @@ -120,7 +120,7 @@ Ensure that the Haskell miso [cachix](cachix.org) is being used when building yo

```yaml
- name: Install cachix
uses: cachix/cachix-action@v16
uses: cachix/cachix-action@v17
with:
name: haskell-miso-cachix
```
Expand Down
8 changes: 4 additions & 4 deletions app/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,13 @@ viewModel _ x = H.div_
[ P.class_ "buttons-container"
]
[ H.button_
[ E.onClick AddOne
[ E.onClick SubtractOne

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, couldn't resist, this is really triggering me.
Increment button just need to be on the right, where the positive X axis points.
The universe just is that way 😆

, P.class_ "decrement-btn"
] [text "+"]
] [text "-"]
, H.button_
[ E.onClick SubtractOne
[ E.onClick AddOne
, P.class_ "increment-btn"
] [text "-"]
] [text "+"]
]
]
-----------------------------------------------------------------------------
Expand Down