elm-pages 3.0.16 → 3.0.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -12,7 +12,7 @@
12
12
  "elm/json": "1.1.3",
13
13
  "elm/regex": "1.0.0",
14
14
  "jfmengels/elm-review": "2.14.0",
15
- "mdgriffith/elm-codegen": "4.2.2",
15
+ "mdgriffith/elm-codegen": "5.0.0",
16
16
  "stil4m/elm-syntax": "7.3.2",
17
17
  "the-sett/elm-syntax-dsl": "6.0.3"
18
18
  },
@@ -1,5 +1,5 @@
1
1
  {
2
- "elm-codegen-version": "0.5.1",
2
+ "elm-codegen-version": "0.6.0",
3
3
  "codegen-helpers": {
4
4
  "packages": {
5
5
  "elm/core": "1.0.5",
@@ -12,7 +12,7 @@ export default {
12
12
  },
13
13
  preloadTagForFile(file) {
14
14
  // add preload directives for JS assets and font assets, etc., skip for CSS files
15
- // this function will be called with each file that is procesed by Vite, including any files in your headTagsTemplate in your config
15
+ // this function will be called with each file that is processed by Vite, including any files in your headTagsTemplate in your config
16
16
  return !file.endsWith(".css");
17
17
  },
18
18
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "elm-pages",
3
3
  "type": "module",
4
- "version": "3.0.16",
4
+ "version": "3.0.17",
5
5
  "homepage": "https://elm-pages.com",
6
6
  "moduleResolution": "node",
7
7
  "description": "Type-safe static sites, written in pure elm with your own custom elm-markup syntax.",
@@ -25,49 +25,48 @@
25
25
  "author": "Dillon Kearns",
26
26
  "license": "BSD-3-Clause",
27
27
  "dependencies": {
28
- "@sindresorhus/merge-streams": "^3.0.0",
28
+ "@sindresorhus/merge-streams": "^4.0.0",
29
29
  "busboy": "^1.6.0",
30
- "chokidar": "^3.5.3",
31
- "cli-cursor": "^4.0.0",
32
- "commander": "^11.1.0",
30
+ "chokidar": "^4.0.1",
31
+ "cli-cursor": "^5.0.0",
32
+ "commander": "^12.1.0",
33
33
  "connect": "^3.7.0",
34
- "cookie-signature": "^1.2.1",
35
- "cross-spawn": "7.0.3",
34
+ "cookie-signature": "^1.2.2",
35
+ "cross-spawn": "7.0.6",
36
36
  "devcert": "^1.2.2",
37
37
  "elm-doc-preview": "^5.0.5",
38
38
  "elm-hot": "^1.1.6",
39
- "esbuild": "^0.19.11",
39
+ "esbuild": "^0.24.0",
40
40
  "fs-extra": "^11.2.0",
41
- "globby": "14.0.0",
41
+ "globby": "14.0.2",
42
42
  "gray-matter": "^4.0.3",
43
43
  "jsesc": "^3.0.2",
44
44
  "kleur": "^4.1.5",
45
- "make-fetch-happen": "^13.0.0",
46
- "memfs": "^4.6.0",
47
- "micromatch": "^4.0.5",
48
- "serve-static": "^1.15.0",
49
- "terser": "^5.26.0",
50
- "vite": "^5.0.11",
51
- "which": "^4.0.0"
45
+ "make-fetch-happen": "^14.0.3",
46
+ "memfs": "^4.14.0",
47
+ "micromatch": "^4.0.8",
48
+ "serve-static": "^1.16.2",
49
+ "terser": "^5.36.0",
50
+ "which": "^5.0.0"
52
51
  },
53
52
  "devDependencies": {
54
53
  "@types/cross-spawn": "^6.0.6",
55
54
  "@types/fs-extra": "^11.0.4",
56
55
  "@types/make-fetch-happen": "^10.0.4",
57
- "@types/micromatch": "^4.0.6",
58
- "@types/node": "^20.10.7",
59
- "@types/serve-static": "^1.15.5",
60
- "cypress": "^13.6.2",
61
- "elm-codegen": "^0.5.0",
56
+ "@types/micromatch": "^4.0.9",
57
+ "@types/node": "^22.10.0",
58
+ "@types/serve-static": "^1.15.7",
59
+ "cypress": "^13.16.0",
60
+ "elm-codegen": "^0.6.1",
62
61
  "elm-optimize-level-2": "^0.3.5",
63
62
  "elm-review": "^2.12.0",
64
63
  "elm-test": "^0.19.1-revision12",
65
- "elm-tooling": "^1.15.0",
66
- "elm-verify-examples": "^5.3.0",
67
- "lamdera": "^0.19.1-1.2.1-1",
68
- "typescript": "^5.3.3",
69
- "vite": "^5.0.11",
70
- "vitest": "^1.1.3"
64
+ "elm-tooling": "^1.15.1",
65
+ "elm-verify-examples": "^6.0.3",
66
+ "lamdera": "^0.19.1-1.3.2",
67
+ "typescript": "^5.7.2",
68
+ "vite": "^6.0.0",
69
+ "vitest": "^2.1.6"
71
70
  },
72
71
  "files": [
73
72
  "adapter/",
@@ -28,6 +28,7 @@ with the wiring form a `Form`.
28
28
  import Cli.Option
29
29
  import Elm
30
30
  import Elm.Annotation as Type
31
+ import Elm.Arg
31
32
  import Elm.Declare
32
33
  import Elm.Op
33
34
  import List.Extra
@@ -55,113 +56,111 @@ type alias Context =
55
56
  }
56
57
 
57
58
 
58
- formWithFields : Bool -> List ( String, Kind ) -> ({ formState : { errors : Elm.Expression, submitting : Elm.Expression, submitAttempted : Elm.Expression, data : Elm.Expression, expression : Elm.Expression }, params : List { name : String, kind : Kind, param : Elm.Expression } } -> Elm.Expression) -> { declaration : Elm.Declaration, call : List Elm.Expression -> Elm.Expression, callFrom : List String -> List Elm.Expression -> Elm.Expression, value : List String -> Elm.Expression }
59
+ formWithFields : Bool -> List ( String, Kind ) -> ({ formState : { errors : Elm.Expression, submitting : Elm.Expression, submitAttempted : Elm.Expression, data : Elm.Expression, expression : Elm.Expression }, params : List { name : String, kind : Kind, param : Elm.Expression } } -> Elm.Expression) -> Elm.Declare.Value
59
60
  formWithFields elmCssView fields viewFn =
60
- Elm.Declare.function "form"
61
- []
62
- (\_ ->
63
- fields
64
- |> List.foldl
65
- (\( fieldName, kind ) chain ->
66
- chain
67
- |> Elm.Op.pipe
68
- (formField fieldName
69
- (case kind of
70
- FieldText ->
71
- formFieldText
72
- |> Elm.Op.pipe (formFieldRequired (Elm.string "Required"))
73
-
74
- FieldInt ->
75
- formFieldInt { invalid = \_ -> Elm.string "" }
76
- |> Elm.Op.pipe (formFieldRequired (Elm.string "Required"))
77
-
78
- FieldTextarea ->
79
- formFieldText
80
- |> Elm.Op.pipe (formFieldRequired (Elm.string "Required"))
81
- |> Elm.Op.pipe
82
- (formFieldTextarea
83
- { rows = Elm.nothing
84
- , cols = Elm.nothing
85
- }
86
- )
87
-
88
- FieldFloat ->
89
- formFieldFloat { invalid = \_ -> Elm.string "" }
90
- |> Elm.Op.pipe (formFieldRequired (Elm.string "Required"))
91
-
92
- FieldTime ->
93
- formFieldTime { invalid = \_ -> Elm.string "" }
94
- |> Elm.Op.pipe (formFieldRequired (Elm.string "Required"))
95
-
96
- FieldDate ->
97
- formFieldDate { invalid = \_ -> Elm.string "" }
98
- |> Elm.Op.pipe (formFieldRequired (Elm.string "Required"))
99
-
100
- FieldCheckbox ->
101
- formFieldCheckbox
102
- )
103
- )
104
- )
105
- (Elm.function (List.map fieldToParam fields)
106
- (\params ->
107
- Elm.record
108
- [ ( "combine"
109
- , params
110
- |> List.foldl
111
- (\fieldExpression chain ->
112
- chain
113
- |> Elm.Op.pipe (validationAndMap fieldExpression)
114
- )
115
- (Elm.val "ParsedForm"
116
- |> Elm.Op.pipe validationSucceed
117
- )
118
- )
119
- , ( "view"
120
- , Elm.fn ( "formState", Nothing )
121
- (\formState ->
122
- let
123
- mappedParams : List { name : String, kind : Kind, param : Elm.Expression }
124
- mappedParams =
125
- params
126
- |> List.Extra.zip fields
127
- |> List.map
128
- (\( ( name, kind ), param ) ->
129
- { name = name
130
- , kind = kind
131
- , param = param
132
- }
133
- )
134
- in
135
- viewFn
136
- { formState =
137
- { errors = formState |> Elm.get "errors"
138
- , submitting = formState |> Elm.get "submitting"
139
- , submitAttempted = formState |> Elm.get "submitAttempted"
140
- , data = formState |> Elm.get "data"
141
- , expression = formState
61
+ Elm.Declare.value "form"
62
+ (fields
63
+ |> List.foldl
64
+ (\( fieldName, kind ) chain ->
65
+ chain
66
+ |> Elm.Op.pipe
67
+ (formField fieldName
68
+ (case kind of
69
+ FieldText ->
70
+ formFieldText
71
+ |> Elm.Op.pipe (formFieldRequired (Elm.string "Required"))
72
+
73
+ FieldInt ->
74
+ formFieldInt { invalid = \_ -> Elm.string "" }
75
+ |> Elm.Op.pipe (formFieldRequired (Elm.string "Required"))
76
+
77
+ FieldTextarea ->
78
+ formFieldText
79
+ |> Elm.Op.pipe (formFieldRequired (Elm.string "Required"))
80
+ |> Elm.Op.pipe
81
+ (formFieldTextarea
82
+ { rows = Elm.nothing
83
+ , cols = Elm.nothing
142
84
  }
143
- , params = mappedParams
144
- }
85
+ )
86
+
87
+ FieldFloat ->
88
+ formFieldFloat { invalid = \_ -> Elm.string "" }
89
+ |> Elm.Op.pipe (formFieldRequired (Elm.string "Required"))
90
+
91
+ FieldTime ->
92
+ formFieldTime { invalid = \_ -> Elm.string "" }
93
+ |> Elm.Op.pipe (formFieldRequired (Elm.string "Required"))
94
+
95
+ FieldDate ->
96
+ formFieldDate { invalid = \_ -> Elm.string "" }
97
+ |> Elm.Op.pipe (formFieldRequired (Elm.string "Required"))
98
+
99
+ FieldCheckbox ->
100
+ formFieldCheckbox
101
+ )
102
+ )
103
+ )
104
+ (Elm.function (List.map fieldToParam fields)
105
+ (\params ->
106
+ Elm.record
107
+ [ ( "combine"
108
+ , params
109
+ |> List.foldl
110
+ (\fieldExpression chain ->
111
+ chain
112
+ |> Elm.Op.pipe (validationAndMap fieldExpression)
145
113
  )
146
- )
147
- ]
148
- )
149
- |> Elm.Op.pipe formInit
114
+ (Elm.val "ParsedForm"
115
+ |> Elm.Op.pipe validationSucceed
116
+ )
117
+ )
118
+ , ( "view"
119
+ , Elm.fn (Elm.Arg.var "formState")
120
+ (\formState ->
121
+ let
122
+ mappedParams : List { name : String, kind : Kind, param : Elm.Expression }
123
+ mappedParams =
124
+ params
125
+ |> List.Extra.zip fields
126
+ |> List.map
127
+ (\( ( name, kind ), param ) ->
128
+ { name = name
129
+ , kind = kind
130
+ , param = param
131
+ }
132
+ )
133
+ in
134
+ viewFn
135
+ { formState =
136
+ { errors = formState |> Elm.get "errors"
137
+ , submitting = formState |> Elm.get "submitting"
138
+ , submitAttempted = formState |> Elm.get "submitAttempted"
139
+ , data = formState |> Elm.get "data"
140
+ , expression = formState
141
+ }
142
+ , params = mappedParams
143
+ }
144
+ )
145
+ )
146
+ ]
150
147
  )
151
- |> Elm.withType
152
- (Type.namedWith [ "Form" ]
153
- (if elmCssView then
154
- "StyledHtmlForm"
148
+ |> Elm.Op.pipe formInit
149
+ )
150
+ |> Elm.withType
151
+ (Type.namedWith [ "Form" ]
152
+ (if elmCssView then
153
+ "StyledHtmlForm"
155
154
 
156
- else
157
- "HtmlForm"
158
- )
159
- [ Type.string
160
- , Type.named [] "ParsedForm"
161
- , Type.var "input"
162
- , Type.namedWith [ "PagesMsg" ] "PagesMsg" [ Type.named [] "Msg" ]
163
- ]
155
+ else
156
+ "HtmlForm"
164
157
  )
158
+ [ Type.string
159
+ , Type.named [] "ParsedForm"
160
+ , Type.var "input"
161
+ , Type.namedWith [ "PagesMsg" ] "PagesMsg" [ Type.named [] "Msg" ]
162
+ ]
163
+ )
165
164
  )
166
165
 
167
166
 
@@ -246,29 +245,27 @@ provide { fields, view, elmCssView } =
246
245
 
247
246
  else
248
247
  let
249
- form : { declaration : Elm.Declaration, call : List Elm.Expression -> Elm.Expression, callFrom : List String -> List Elm.Expression -> Elm.Expression, value : List String -> Elm.Expression }
248
+ form : Elm.Declare.Value
250
249
  form =
251
250
  formWithFields elmCssView fields view
252
251
 
253
- formHandlersDeclaration : { declaration : Elm.Declaration, call : List Elm.Expression -> Elm.Expression, callFrom : List String -> List Elm.Expression -> Elm.Expression, value : List String -> Elm.Expression }
252
+ formHandlersDeclaration : Elm.Declare.Value
254
253
  formHandlersDeclaration =
255
254
  -- TODO customizable formHandlers name?
256
- Elm.Declare.function "formHandlers"
257
- []
258
- (\_ ->
259
- initCombined (Elm.val "Action") (form.call [])
260
- |> Elm.withType
261
- (Type.namedWith [ "Form", "Handler" ]
262
- "Handler"
263
- [ Type.string
264
- , Type.named [] "Action"
265
- ]
266
- )
255
+ Elm.Declare.value "formHandlers"
256
+ (initCombined (Elm.val "Action") form.value
257
+ |> Elm.withType
258
+ (Type.namedWith [ "Form", "Handler" ]
259
+ "Handler"
260
+ [ Type.string
261
+ , Type.named [] "Action"
262
+ ]
263
+ )
267
264
  )
268
265
  in
269
266
  Just
270
- { formHandlers = formHandlersDeclaration.call []
271
- , form = form.call []
267
+ { formHandlers = formHandlersDeclaration.value
268
+ , form = form.value
272
269
  , declarations =
273
270
  [ formWithFields elmCssView fields view |> .declaration
274
271
  , Elm.customType "Action"
@@ -50,6 +50,7 @@ import Cli.Option as Option
50
50
  import Cli.Validate
51
51
  import Elm
52
52
  import Elm.Annotation
53
+ import Elm.Arg
53
54
  import Elm.Declare
54
55
  import Elm.Op
55
56
  import Pages.Internal.RoutePattern as RoutePattern
@@ -541,21 +542,16 @@ userFunction :
541
542
  -> { path : String, body : String }
542
543
  userFunction moduleName definitions =
543
544
  let
544
- viewFn :
545
- { declaration : Elm.Declaration
546
- , call : Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression
547
- , callFrom : List String -> Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression
548
- , value : List String -> Elm.Expression
549
- }
545
+ viewFn : Elm.Declare.Function (Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression)
550
546
  viewFn =
551
547
  case definitions.localState of
552
548
  Just _ ->
553
549
  Elm.Declare.fn3 "view"
554
- ( "app", Just appType )
555
- ( "shared"
556
- , Just (Elm.Annotation.named [ "Shared" ] "Model")
550
+ (Elm.Arg.varWith "app" appType)
551
+ (Elm.Arg.varWith "shared"
552
+ (Elm.Annotation.named [ "Shared" ] "Model")
557
553
  )
558
- ( "model", Just (Elm.Annotation.named [] "Model") )
554
+ (Elm.Arg.varWith "model" (Elm.Annotation.named [] "Model"))
559
555
  (\app shared model ->
560
556
  definitions.view app shared model
561
557
  |> Elm.withType
@@ -571,17 +567,12 @@ userFunction moduleName definitions =
571
567
 
572
568
  Nothing ->
573
569
  let
574
- viewDeclaration :
575
- { declaration : Elm.Declaration
576
- , call : Elm.Expression -> Elm.Expression -> Elm.Expression
577
- , callFrom : List String -> Elm.Expression -> Elm.Expression -> Elm.Expression
578
- , value : List String -> Elm.Expression
579
- }
570
+ viewDeclaration : Elm.Declare.Function (Elm.Expression -> Elm.Expression -> Elm.Expression)
580
571
  viewDeclaration =
581
572
  Elm.Declare.fn2 "view"
582
- ( "app", Just appType )
583
- ( "shared"
584
- , Just (Elm.Annotation.named [ "Shared" ] "Model")
573
+ (Elm.Arg.varWith "app" appType)
574
+ (Elm.Arg.varWith "shared"
575
+ (Elm.Annotation.named [ "Shared" ] "Model")
585
576
  )
586
577
  (\app shared ->
587
578
  definitions.view app shared Elm.unit
@@ -595,33 +586,30 @@ userFunction moduleName definitions =
595
586
  ]
596
587
  )
597
588
  )
589
+
590
+ viewDeclarationExternal : Elm.Declare.Function (Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression)
591
+ viewDeclarationExternal =
592
+ Elm.Declare.fn3 "view"
593
+ (Elm.Arg.varWith "app" appType)
594
+ (Elm.Arg.varWith "shared"
595
+ (Elm.Annotation.named [ "Shared" ] "Model")
596
+ )
597
+ (Elm.Arg.varWith "model" (Elm.Annotation.named [] "Model"))
598
+ (\_ _ _ ->
599
+ Elm.unit
600
+ )
598
601
  in
599
602
  { declaration = viewDeclaration.declaration
600
603
  , call = \app shared _ -> viewDeclaration.call app shared
601
- , callFrom = \a _ c d -> viewDeclaration.callFrom a c d
602
604
  , value = viewDeclaration.value
605
+ , internal = viewDeclarationExternal.internal
603
606
  }
604
607
 
605
608
  localDefinitions :
606
609
  Maybe
607
- { updateFn :
608
- { declaration : Elm.Declaration
609
- , call : Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression
610
- , callFrom : List String -> Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression
611
- , value : List String -> Elm.Expression
612
- }
613
- , initFn :
614
- { declaration : Elm.Declaration
615
- , call : Elm.Expression -> Elm.Expression -> Elm.Expression
616
- , callFrom : List String -> Elm.Expression -> Elm.Expression -> Elm.Expression
617
- , value : List String -> Elm.Expression
618
- }
619
- , subscriptionsFn :
620
- { declaration : Elm.Declaration
621
- , call : Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression
622
- , callFrom : List String -> Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression
623
- , value : List String -> Elm.Expression
624
- }
610
+ { updateFn : Elm.Declare.Function (Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression)
611
+ , initFn : Elm.Declare.Function (Elm.Expression -> Elm.Expression -> Elm.Expression)
612
+ , subscriptionsFn : Elm.Declare.Function (Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression -> Elm.Expression)
625
613
  , state : State
626
614
  }
627
615
  localDefinitions =
@@ -630,10 +618,10 @@ userFunction moduleName definitions =
630
618
  (\localState ->
631
619
  { updateFn =
632
620
  Elm.Declare.fn4 "update"
633
- ( "app", Just appType )
634
- ( "shared", Just (Elm.Annotation.named [ "Shared" ] "Model") )
635
- ( "msg", Just (Elm.Annotation.named [] "Msg") )
636
- ( "model", Just (Elm.Annotation.named [] "Model") )
621
+ (Elm.Arg.varWith "app" appType)
622
+ (Elm.Arg.varWith "shared" (Elm.Annotation.named [ "Shared" ] "Model"))
623
+ (Elm.Arg.varWith "msg" (Elm.Annotation.named [] "Msg"))
624
+ (Elm.Arg.varWith "model" (Elm.Annotation.named [] "Model"))
637
625
  (\app shared msg model ->
638
626
  localState.update app shared msg model
639
627
  |> Elm.withType
@@ -644,8 +632,8 @@ userFunction moduleName definitions =
644
632
  )
645
633
  , initFn =
646
634
  Elm.Declare.fn2 "init"
647
- ( "app", Just appType )
648
- ( "shared", Just (Elm.Annotation.named [ "Shared" ] "Model") )
635
+ (Elm.Arg.varWith "app" appType)
636
+ (Elm.Arg.varWith "shared" (Elm.Annotation.named [ "Shared" ] "Model"))
649
637
  (\shared app ->
650
638
  localState.init app shared
651
639
  |> Elm.withType
@@ -657,10 +645,10 @@ userFunction moduleName definitions =
657
645
  , subscriptionsFn =
658
646
  Elm.Declare.fn4
659
647
  "subscriptions"
660
- ( "routeParams", "RouteParams" |> Elm.Annotation.named [] |> Just )
661
- ( "path", Elm.Annotation.namedWith [ "UrlPath" ] "UrlPath" [] |> Just )
662
- ( "shared", Just (Elm.Annotation.named [ "Shared" ] "Model") )
663
- ( "model", localType "Model" |> Just )
648
+ (Elm.Arg.varWith "routeParams" (Elm.Annotation.named [] "RouteParams"))
649
+ (Elm.Arg.varWith "path" (Elm.Annotation.named [ "UrlPath" ] "UrlPath"))
650
+ (Elm.Arg.varWith "shared" (Elm.Annotation.named [ "Shared" ] "Model"))
651
+ (Elm.Arg.varWith "model" (localType "Model"))
664
652
  (\routeParams path shared model ->
665
653
  localState.subscriptions routeParams path shared model
666
654
  |> Elm.withType (Elm.Annotation.namedWith [] "Sub" [ localType "Msg" ])
@@ -669,7 +657,7 @@ userFunction moduleName definitions =
669
657
  }
670
658
  )
671
659
 
672
- dataFn : { declaration : Elm.Declaration, call : List Elm.Expression -> Elm.Expression, callFrom : List String -> List Elm.Expression -> Elm.Expression, value : List String -> Elm.Expression }
660
+ dataFn : Elm.Declare.Function (List Elm.Expression -> Elm.Expression)
673
661
  dataFn =
674
662
  case definitions.action of
675
663
  Pages Nothing ->
@@ -743,7 +731,7 @@ userFunction moduleName definitions =
743
731
  Elm.unit
744
732
  )
745
733
 
746
- actionFn : Maybe { declaration : Elm.Declaration, call : List Elm.Expression -> Elm.Expression, callFrom : List String -> List Elm.Expression -> Elm.Expression, value : List String -> Elm.Expression }
734
+ actionFn : Maybe (Elm.Declare.Function (List Elm.Expression -> Elm.Expression))
747
735
  actionFn =
748
736
  case definitions.action of
749
737
  Action action_ ->
@@ -778,10 +766,10 @@ userFunction moduleName definitions =
778
766
  (\_ -> justPagesExpression)
779
767
  )
780
768
 
781
- headFn : { declaration : Elm.Declaration, call : Elm.Expression -> Elm.Expression, callFrom : List String -> Elm.Expression -> Elm.Expression, value : List String -> Elm.Expression }
769
+ headFn : Elm.Declare.Function (Elm.Expression -> Elm.Expression)
782
770
  headFn =
783
771
  Elm.Declare.fn "head"
784
- ( "app", Just appType )
772
+ (Elm.Arg.varWith "app" appType)
785
773
  (definitions.head
786
774
  >> Elm.withType
787
775
  (Elm.Annotation.list