Skip to content

Commit d759841

Browse files
committed
Bump flake
1 parent bd60f3c commit d759841

File tree

5 files changed

+11
-12
lines changed

5 files changed

+11
-12
lines changed

.github/workflows/main.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
21
name: Build and deploy
32

43
on:
54
push:
65
branches: main
6+
pull_request:
77

88
permissions:
99
contents: read
@@ -30,6 +30,7 @@ jobs:
3030
path: ./public
3131

3232
deploy:
33+
if: github.ref == 'refs/heads/main'
3334
runs-on: ubuntu-latest
3435

3536
environment:

cabal.project

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,4 @@ flags: +template-haskell
99
source-repository-package
1010
type: git
1111
location: https://github.com/dmjio/miso
12-
branch: master
13-
12+
tag: 8c4b85e6e1279bec9b66859c54f25209701b8153

flake.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Main.hs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ foreign export javascript "hs_start" main :: IO ()
3333
----------------------------------------------------------------------------
3434
-- | Main entry point
3535
main :: IO ()
36-
main = run (startComponent app)
36+
main = run (startApp app)
3737
----------------------------------------------------------------------------
3838
-- | Model
3939
newtype Model = Model
@@ -51,7 +51,7 @@ data Action
5151
| ErrorHandler MisoString
5252
deriving (Show, Eq)
5353
----------------------------------------------------------------------------
54-
app :: Component Model Action
54+
app :: App Model Action
5555
app = (component emptyModel updateModel viewModel)
5656
#ifndef WASM
5757
{ styles =
@@ -67,7 +67,7 @@ emptyModel = Model Nothing
6767
-- | GitHub API method
6868
type GithubAPI = Get '[JSON] GitHub
6969
----------------------------------------------------------------------------
70-
updateModel :: Action -> Effect Model Action
70+
updateModel :: Action -> Transition Model Action
7171
updateModel FetchGitHub =
7272
fetch "https://api.github.com" "GET" Nothing [] SetGitHub ErrorHandler
7373
updateModel (SetGitHub apiInfo) =
@@ -76,7 +76,7 @@ updateModel (ErrorHandler msg) =
7676
io_ (consoleError msg)
7777
----------------------------------------------------------------------------
7878
-- | View function, with routing
79-
viewModel :: Model -> View Action
79+
viewModel :: Model -> View Model Action
8080
viewModel m = view
8181
where
8282
view =
@@ -128,7 +128,7 @@ viewModel m = view
128128
]
129129
]
130130

131-
tr :: MisoString -> View action
131+
tr :: MisoString -> View Model action
132132
tr x = tr_ [] [ td_ [] [ text x ] ]
133133

134134
attrs :: [Attribute Action]

static/index.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
<!DOCTYPE html>
32
<html>
43
<head>

0 commit comments

Comments
 (0)