on master help sign in
Merge branch 'master' into webgl
commit5e6a8c98aa37a71c62566ac147b0684e7cbec7be authorJohn P Mayer Jr <john.p.mayer.jr@gmail.com> dateWed 2 Apr 2014, 01:43 (13 years ago) parent909c4260c106b3
3 files changed+10−11
libraries/Native/Text.js+1 libraries/Signal.elm+8−10 libraries/String.elm+1−1
libraries/Native/Text.js+1
@@ -153,6 +153,7 @@ Elm.Native.Text.make = function(elm) {
153153 typeface : F2(typeface),
154154 color : F2(color),
155155 link : F2(link),
156+ style : F2(style),
156157
157158 leftAligned : block('left'),
158159 rightAligned : block('right'),
libraries/Signal.elm+8−10
@@ -120,20 +120,18 @@ initially. -}
120120dropIf : (a -> Bool) -> a -> Signal a -> Signal a
121121dropIf = Native.Signal.dropIf
122122
123−{-| Keep events only when the first signal is true. When the first signal
124−becomes true, the most recent value of the second signal will be propagated.
125−Until the first signal becomes false again, all events will be propagated. Elm
126−does not allow undefined signals, so a base case must be provided in case the
127−first signal is not true initially. -}
123+{-| Keep events only when the first signal is true. Elm does not allow undefined
124+signals, so a base case must be provided in case the first signal is not true
125+initially.
126+-}
128127keepWhen : Signal Bool -> a -> Signal a -> Signal a
129128keepWhen bs def sig =
130129 snd <~ (keepIf fst (False, def) ((,) <~ (sampleOn sig bs) ~ sig))
131130
132−{-| Drop events when the first signal is true. When the first signal becomes
133−false, the most recent value of the second signal will be propagated. Until the
134−first signal becomes true again, all events will be propagated. Elm does not
135−allow undefined signals, s oa base case must be provided in case the first
136−signal is true initially. -}
131+{-| Drop events when the first signal is true. Elm does not allow undefined
132+signals, so a base case must be provided in case the first signal is true
133+initially.
134+-}
137135dropWhen : Signal Bool -> a -> Signal a -> Signal a
138136dropWhen bs = keepWhen (not <~ bs)
139137
libraries/String.elm+1−1
@@ -114,7 +114,7 @@ foldr = Native.String.foldr
114114{-| Split a string using a given separator.
115115
116116 split "," "cat,dog,cow" == ["cat","dog","cow"]
117− split "/" "home/evan/Desktop/" == ["home","evan","Desktop"]
117+ split "/" "home/evan/Desktop/" == ["home","evan","Desktop", ""]
118118
119119Use `Regex.split` if you need something more flexible.
120120-}