on master help sign in
Merge pull request #798 from mgold/docs-fixes

Document Field.defaultStyle, id -> identity

commit2f5752d4adc3946f43ab54889032f5c8d578a99d authorEvan Czaplicki <info@elm-lang.org> dateFri 10 Oct 2014, 21:56 (12 years ago) parentda816d52ffc73d
3 files changed+4−4
libraries/Array.elm+1−1 libraries/Graphics/Input.elm+1−1 libraries/Graphics/Input/Field.elm+2−2
libraries/Array.elm+1−1
@@ -30,7 +30,7 @@ data Array a = Array
3030{-| Initialize an array. `initialize n f` creates an array of length `n` with
3131the element at index `i` initialized to the result of `(f i)`.
3232
33− initialize 4 id == fromList [0,1,2,3]
33+ initialize 4 identity == fromList [0,1,2,3]
3434 initialize 4 (\n -> n*n) == fromList [0,1,4,9]
3535 initialize 4 (always 0) == fromList [0,0,0,0]
3636-}
libraries/Graphics/Input.elm+1−1
@@ -104,7 +104,7 @@ customButton = Native.Graphics.Input.customButton
104104
105105 boxes : Bool -> Element
106106 boxes checked =
107− let box = container 40 40 middle (checkbox check.handle id checked)
107+ let box = container 40 40 middle (checkbox check.handle identity checked)
108108 in flow right [ box, box, box ]
109109
110110 main : Signal Element
libraries/Graphics/Input/Field.elm+2−2
@@ -11,7 +11,7 @@ text fields programmatically.
1111@docs Content, Selection, Direction, noContent
1212
1313# Field Style
14−@docs Style, Outline, noOutline, Highlight, noHighlight, Dimensions, uniformly
14+@docs defaultStyle, Style, Outline, noOutline, Highlight, noHighlight, Dimensions, uniformly
1515-}
1616
1717import Color (Color)
@@ -140,7 +140,7 @@ to match what they have entered.
140140 name = input noContent
141141
142142 nameField : Signal Element
143− nameField = field defaultStyle name.handle id "Name" <~ name.signal
143+ nameField = field defaultStyle name.handle identity "Name" <~ name.signal
144144
145145When we use the `field` function, we first give it a visual style. This is
146146the first argument so that it is easier to define your own custom field