on master help sign in
Merge branch 'dev' into topic/webgl
be90dd6John P Mayer Jr
CONTRIBUTING.mdnew file+26
@@ -0,0 +1,26 @@
1+# Contributing to Elm
2+
3+Thanks helping with the development of Elm! **Here's how you can help.**
4+
5+## Opening a PR
6+
7+The master branch of Elm is used for tagging releases, and the dev branch is
8+where the most active development occurs.
9+
10+**Please open PRs against the [dev branch of
11+Elm](http://github.com/evancz/elm/tree/dev) whenever possible.** Changes that
12+are compatible with the API of master will be merged to master as soon as
13+possible. Changes that affect Elm's API will be merged to master with a future
14+release of the compiler.
15+
16+Note that changes in the master branch of [Elm](https://github.com/evancz/Elm/)
17+are able to be compiled against the master branch of the [elm-lang.org
18+repo](https://github.com/evancz/elm-lang.org), and the dev branch of
19+[Elm](https://github.com/evancz/Elm/) is able to be built with the dev branch of
20+the [elm-lang.org repo](https://github.com/evancz/elm-lang.org). Please make
21+sure that your changes maintain this compatibility.
22+
23+## Licensing
24+
25+You should sign the [contributor agreement](Contributor Agreement.docx?raw=true)
26+and send it to <info@elm-lang.org> before opening your pull request.
Elm.cabal+1
@@ -103,6 +103,7 @@ Library
103
103
104Executable elm
104Executable elm
105 Main-is: Compiler.hs
105 Main-is: Compiler.hs
106+ ghc-options: -threaded -O2
106 Hs-Source-Dirs: compiler
107 Hs-Source-Dirs: compiler
107 other-modules: SourceSyntax.Declaration,
108 other-modules: SourceSyntax.Declaration,
108 SourceSyntax.Expression,
109 SourceSyntax.Expression,
compiler/Language/Elm.hs+13−18
@@ -1,18 +1,11 @@
1−{- | This module exports the functions necessary for compiling Elm to JS,
1+{- | This module exports functions for compiling Elm to JS
2 and some utilities for making it easier to find some Elm-related files.
2 and some utilities for making it easier to find some Elm-related files.
3
3
4− The documentation for the Elm language is available at
4+ Learning resources for Elm are available at
5− <http://elm-lang.org/Documentation.elm>, and many interactive examples are
5+ <http://elm-lang.org.elm/Learn.elm> and many interactive examples are
6 available at <http://elm-lang.org/Examples.elm>
6 available at <http://elm-lang.org/Examples.elm>
7-}
7-}
8−module Language.Elm ( compile
8+module Language.Elm (compile, moduleName, runtime, docs) where
9− , interfaces
10− , moduleName
11− , runtime
12− , docs
13− , Interfaces
14− , ModuleInterface )
15−where
16
9
17import qualified Data.List as List
10import qualified Data.List as List
18import qualified Data.Map as Map
11import qualified Data.Map as Map
@@ -25,17 +18,19 @@ import Text.Blaze.Html (Html)
25import qualified Text.PrettyPrint as P
18import qualified Text.PrettyPrint as P
26import qualified Metadata.Prelude as Prelude
19import qualified Metadata.Prelude as Prelude
27import Paths_Elm
20import Paths_Elm
21+import System.IO.Unsafe
28
22
29-- |This function compiles Elm code to JavaScript. It will return either
23-- |This function compiles Elm code to JavaScript. It will return either
30-- an error message or the compiled JS code.
24-- an error message or the compiled JS code.
31−compile :: Interfaces -> String -> Either String String
25+compile :: String -> Either String String
32−compile ifaces source = do
26+compile source =
33− case buildFromSource False ifaces source of
27+ case buildFromSource False interfaces source of
34− Left docs -> Left . unlines . List.intersperse "" $ map P.render docs
28+ Left docs -> Left . unlines . List.intersperse "" $ map P.render docs
35− Right modul -> Right $ jsModule (modul :: MetadataModule () ())
29+ Right modul -> Right $ jsModule (modul :: MetadataModule () ())
36
30
31+{-# NOINLINE interfaces #-}
37−interfaces :: IO Interfaces
32+interfaces :: Interfaces
38−interfaces = Prelude.interfaces
33+interfaces = unsafePerformIO $ Prelude.interfaces
39
34
40-- |This function extracts the module name of a given source program.
35-- |This function extracts the module name of a given source program.
41moduleName :: String -> Maybe String
36moduleName :: String -> Maybe String
compiler/Parse/Expression.hs+1−1
@@ -66,7 +66,7 @@ listTerm = markdown' <|> glShader' <|> braces (try range <|> ExplicitList <$> co
66 return $ GLShader uid (filter (/='\r') rawSrc)
66 return $ GLShader uid (filter (/='\r') rawSrc)
67
67
68 span uid index =
68 span uid index =
69− "<span id=\"md-" ++ uid ++ "-" ++ show index ++ "\"></span>"
69+ "<span id=\"md-" ++ uid ++ "-" ++ show index ++ "\">{{ markdown interpolation is in the pipeline, but still needs more testing }}</span>"
70
70
71 interpolation uid md exprs = do
71 interpolation uid md exprs = do
72 try (string "{{")
72 try (string "{{")
compiler/Parse/Helpers.hs+6−1
@@ -17,7 +17,6 @@ import SourceSyntax.PrettyPrint
17import SourceSyntax.Declaration (Assoc)
17import SourceSyntax.Declaration (Assoc)
18import Text.Parsec hiding (newline,spaces,State)
18import Text.Parsec hiding (newline,spaces,State)
19import Text.Parsec.Indent
19import Text.Parsec.Indent
20−import Text.Read (readMaybe)
21
20
22reserveds = [ "if", "then", "else"
21reserveds = [ "if", "then", "else"
23 , "case", "of"
22 , "case", "of"
@@ -53,6 +52,12 @@ iParseWithTable :: SourceName -> OpTable -> IParser a -> String -> Either ParseE
53iParseWithTable sourceName table aParser input =
52iParseWithTable sourceName table aParser input =
54 runIndent sourceName $ runParserT aParser table sourceName input
53 runIndent sourceName $ runParserT aParser table sourceName input
55
54
55+readMaybe :: Read a => String -> Maybe a
56+readMaybe s =
57+ case [ x | (x,t) <- reads s, ("","") <- lex t ] of
58+ [x] -> Just x
59+ _ -> Nothing
60+
56backslashed :: IParser Char
61backslashed :: IParser Char
57backslashed = do
62backslashed = do
58 char '\\'
63 char '\\'
compiler/Type/Unify.hs+9−3
@@ -111,9 +111,15 @@ actuallyUnify span variable1 variable2 = do
111 _ -> comparableError Nothing
111 _ -> comparableError Nothing
112
112
113 rigidError variable = TS.addError span (Just hint) variable1 variable2
113 rigidError variable = TS.addError span (Just hint) variable1 variable2
114− where hint = "There is a problem with the '" ++
114+ where
115− render (pretty Never variable) ++
115+ var = "'" ++ render (pretty Never variable) ++ "'"
116− "' in the type signature. It currently is not possible to unify type variables that appear in top-level declarations and again in subexpressions"
116+ hint = concat
117+ [ "This probably relates to a type annotation. A type "
118+ , "annotation may say ", var, " but should be a more "
119+ , "specific type. Also, type variables are not "
120+ , "shared between type annotations, so ", var, " in one "
121+ , "is not the same as " ++ var ++ " in another. "
122+ , "Something like that happened" ]
117
123
118 superUnify =
124 superUnify =
119 case (flex desc1, flex desc2, name desc1, name desc2) of
125 case (flex desc1, flex desc2, name desc1, name desc2) of
libraries/Json.elm+3
@@ -3,6 +3,9 @@ module Json where
3
3
4{-| Library for working with [JSON](https://en.wikipedia.org/wiki/JSON) values.
4{-| Library for working with [JSON](https://en.wikipedia.org/wiki/JSON) values.
5
5
6+# Json Values
7+@docs JsonValue
8+
6# Strings
9# Strings
7@docs fromString, toString
10@docs fromString, toString
8
11
libraries/Lazy.elm+16−5
@@ -18,25 +18,36 @@ import Native.Lazy
18
18
19data Lazy a = L { force : () -> a }
19data Lazy a = L { force : () -> a }
20
20
21+{-| Delay a computation. This function memoizes results, so
21−{-| Memoize a thunk so it is evaluated at most once. -}
22+it guarantees that the computation will be evaluated at most once.
23+-}
22lazy : (() -> a) -> Lazy a
24lazy : (() -> a) -> Lazy a
23lazy t = L { force = (Native.Lazy.lazy t) }
25lazy t = L { force = (Native.Lazy.lazy t) }
24
26
25−{-| Execute a lazy value. -}
27+{-| Evaluate a lazy value. It saves the result so the second time
28+you call `force` it does not run the computation again. -}
26force : Lazy a -> a
29force : Lazy a -> a
27force (L r) = r.force ()
30force (L r) = r.force ()
28
31
29−{-| Lazily apply a pure function to a lazy value. -}
32+{-| Lazily apply a function to a lazy value. The computation
33+will be delayed until you force the resulting value.
34+-}
30map : (a -> b) -> Lazy a -> Lazy b
35map : (a -> b) -> Lazy a -> Lazy b
31map f t = lazy <| \() ->
36map f t = lazy <| \() ->
32 f . force <| t
37 f . force <| t
33
38
34−{-| Lazily apply a Lazy function to a Lazy value. -}
39+{-| Lazily apply a lazy function to a lazy value. This can
40+be used to lazily apply a function to many arguments:
41+
42+```haskell
43+f `map` a `apply` b `apply` c
44+```
45+-}
35apply : Lazy (a -> b) -> Lazy a -> Lazy b
46apply : Lazy (a -> b) -> Lazy a -> Lazy b
36apply f x = lazy <| \() ->
47apply f x = lazy <| \() ->
37 (force f) (force x)
48 (force f) (force x)
38
49
39−{-| Lazily chain together Lazy computations. -}
50+{-| Lazily chain together lazy computations. -}
40bind : Lazy a -> (a -> Lazy b) -> Lazy b
51bind : Lazy a -> (a -> Lazy b) -> Lazy b
41bind x k = lazy <| \() ->
52bind x k = lazy <| \() ->
42 force . k . force <| x
53 force . k . force <| x
libraries/Lazy/Stream.elm+193−43
@@ -3,18 +3,19 @@ module Lazy.Stream ( head, tail
3 , map, apply, zip, zipWith, scanl
3 , map, apply, zip, zipWith, scanl
4 , take, drop, splitAt
4 , take, drop, splitAt
5 , sampleOn
5 , sampleOn
6+ , filter, takeWhile, dropWhile, splitWith
6 ) where
7 ) where
7
8
8−{-| Library for Infinite Streams
9+{-| This library is for creating and manipulating infinite streams
9
10
10# Create
11# Create
11−@docs cons, cons', iterate, repeat, cycle
12+@docs cons, cons', repeat, cycle, iterate
12
13
13−# Observe
14+# Use
14−@docs head, tail, sampleOn, take, drop, splitAt
15+@docs head, tail, sampleOn, take, takeWhile, drop, dropWhile, splitAt, splitWith
15
16
16# Transform
17# Transform
17−@docs map, apply, zip, zipWith, scanl
18+@docs map, zip, zipWith, scanl, filter, apply
18
19
19-}
20-}
20
21
@@ -27,88 +28,170 @@ data Stream a = S (Lazy (a, Stream a))
27unS : Stream a -> (a, Stream a)
28unS : Stream a -> (a, Stream a)
28unS (S t) = force t
29unS (S t) = force t
29
30
30−{-| Compute the first element of a Stream -}
31+{-| Get the first element of a stream, called the `head`.
32+
33+```haskell
34+head ones == 1
35+```
36+-}
31head : Stream a -> a
37head : Stream a -> a
32head = fst . unS
38head = fst . unS
33
39
34−{-| Compute the next piece of a Stream -}
40+{-| Drop the `head` of a stream, leaving you with the `tail`.
41+
42+```haskell
43+-- 1, 1, 1, 1, ...
44+stillAllOnes = tail
45+```
46+-}
35tail : Stream a -> Stream a
47tail : Stream a -> Stream a
36tail = snd . unS
48tail = snd . unS
37
49
38−{-| Create a Stream -}
50+{-| Create a stream:
51+
52+```haskell
53+-- 1, 1, 1, 1, ...
54+ones = cons 1 (\() -> ones)
55+```
56+ -}
39cons : a -> (() -> Stream a) -> Stream a
57cons : a -> (() -> Stream a) -> Stream a
40cons x txs = let mtxs = lazy txs in
58cons x txs = let mtxs = lazy txs in
41 S . lazy <| \() ->
59 S . lazy <| \() ->
42 (x, force mtxs)
60 (x, force mtxs)
43
61
44−{-| Lazily create a Stream. -}
62+{-| Create a stream that is slightly more lazy. Notice that the
63+head of the stream is defined within the thunk, so its evaluation
64+is delayed. This is nice when each element of the stream is costly to compute.
65+
66+```haskell
67+-- 1, 1, 1, 1, ...
68+ones = cons' (\_ -> (1,ones))
69+```
70+-}
45cons' : (() -> (a, Stream a)) -> Stream a
71cons' : (() -> (a, Stream a)) -> Stream a
46cons' = S . lazy
72cons' = S . lazy
47
73
48−{-| Create a stream of repeated applications of f to x:
74+{-| Iteratively apply a function to a value:
75+
76+```haskell
77+-- x, f x, f (f x), f (f (f x)), ...
78+iterate f x
49
79
50− iterate f x = S.cons x (S.cons (f x) (S.cons (f (f x)) ...))
80+-- 2, 4, 8, 16, ...
81+powersOf2 = iterate (\n -> n^2) 2
82+```
51-}
83-}
52iterate : (a -> a) -> a -> Stream a
84iterate : (a -> a) -> a -> Stream a
53−iterate f x = cons' <| \() ->
85+iterate f x =
54− (x, iterate f (f x))
86+ cons' <| \_ -> (x, iterate f (f x))
87+
88+{-| Repeat a value infinitely:
55
89
56−{-| Create an infinite Stream of xs. -}
90+```haskell
91+-- 1, 1, 1, 1, ...
92+ones = repeat 1
93+```
94+ -}
57repeat : a -> Stream a
95repeat : a -> Stream a
58repeat x = let go = cons x <| \() -> go
96repeat x = let go = cons x <| \() -> go
59 in go
97 in go
60
98
61−{-| Cycle through the elements of the nonempty list (x :: xs) -}
99+{-| Infinitely cycle through a list, where the head and tail of
100+the list are given separately to ensure that no one tries to cycle
101+on an empty list:
102+
103+```haskell
104+-- "Alice", "Bob", "Alice", "Bob", ...
105+cycle "Alice" ["Bob"]
106+```
107+-}
62cycle : a -> [a] -> Stream a
108cycle : a -> [a] -> Stream a
109+cycle x xs =
63−cycle x xs = let cycle' ys = case ys of
110+ let cycle' ys = case ys of
64− [] -> go
111+ [] -> go
65− (y :: ys) -> cons y <| \() ->
112+ (y :: ys) -> cons y (\_ -> cycle' ys)
66− cycle' ys
67− go = cons' <| \() ->
68− (x, cycle' xs)
113+ go = cons' <| \_ -> (x, cycle' xs)
69− in go
114+ in go
70−
115+
71−{-| Apply a function to every element of a Stream. -}
116+{-| Apply a function to every element of a Stream.
117+
118+```haskell
119+-- 2, 2, 2, 2, ...
120+twos = map (\n -> n + 1) ones
121+```
122+-}
72map : (a -> b) -> Stream a -> Stream b
123map : (a -> b) -> Stream a -> Stream b
73−map f xs = cons' <| \() ->
124+map f xs =
74− (f (head xs), map f (tail xs))
125+ cons' <| \_ -> (f (head xs), map f (tail xs))
75
126
76−{-| Pairwise apply a stream of functions to a stream of inputs.
127+{-| Pairwise apply a stream of functions to a stream of arguments.
77− Together with map, generalizes zipWith to n arguments.
128+When paired with `map`, this can be used to emulate `zipWith` over *n* streams.
78
129
130+```haskell
79− zipWith2 : (a -> b -> c -> d) -> Stream a -> Stream b -> Stream c -> Stream d
131+zipWith3 : (a -> b -> c -> d) -> Stream a -> Stream b -> Stream c -> Stream d
80− zipWith2 f xs ys zs = f `S.map` xs `S.apply` ys `S.apply` zs
132+zipWith3 f xs ys zs = f `S.map` xs `S.apply` ys `S.apply` zs
133+```
81-}
134-}
82apply : Stream (a -> b) -> Stream a -> Stream b
135apply : Stream (a -> b) -> Stream a -> Stream b
83apply fs xs = zipWith (<|) fs xs
136apply fs xs = zipWith (<|) fs xs
84
137
85−{-| Combine two streams, combining them into tuples pairwise. -}
138+{-| Combine two streams, putting them into tuples pairwise:
139+
140+```haskell
141+-- (1,2), (1,4), (1,8), (1,16), ...
142+pairs = zip ones powersOf2
143+```
144+-}
86−zip : Stream a -> Stream b -> Stream (a, b)
145+zip : Stream a -> Stream b -> Stream (a,b)
87zip = zipWith (\x y -> (x,y))
146zip = zipWith (\x y -> (x,y))
88
147
89−{-| Combine two streams, combining them with the given function. -}
148+{-| Combine two streams, applying the given function pairwise:
149+
150+```haskell
151+-- 3, 5, 9, 17, ...
152+zipWith (+) ones powersOf2
153+```
154+-}
90zipWith : (a -> b -> c) -> Stream a -> Stream b -> Stream c
155zipWith : (a -> b -> c) -> Stream a -> Stream b -> Stream c
91zipWith f xs ys = cons' <| \() ->
156zipWith f xs ys = cons' <| \() ->
92 (f (head xs) (head ys),
157 (f (head xs) (head ys),
93 zipWith f (tail xs) (tail ys))
158 zipWith f (tail xs) (tail ys))
94
159
95−{-| Reduce a Stream from the left, building an infinite stream of reductions. -}
160+{-| Scan over a stream from the left, building an infinite stream of reductions.
161+
162+```haskell
163+-- 0, 1, 2, 3, ...
164+runningTotal = scanl (+) 0 ones
165+```
166+-}
96scanl : (a -> b -> b) -> b -> Stream a -> Stream b
167scanl : (a -> b -> b) -> b -> Stream a -> Stream b
97−scanl f init xs = cons' <| \() ->
168+scanl f init xs =
98− (init,
99− scanl f (f (head xs) init) (tail xs))
169+ cons' <| \() -> (init, scanl f (f (head xs) init) (tail xs))
100
170
101−{-| Compute the first n elements of a stream into a list. -}
171+{-| Take the first *n* elements of a stream
172+
173+```haskell
174+take 5 powersOf2 == [2,4,8,16,32]
175+```
176+-}
102take : Int -> Stream a -> [a]
177take : Int -> Stream a -> [a]
103take n xs = fst <| splitAt n xs
178take n xs = fst <| splitAt n xs
104
179
105−{-| Drop n elements from the front of a stream. -}
180+{-| Drop the first *n* elements of a stream
181+
182+```haskell
183+-- 64, 128, 256, 512, ...
184+drop 5 powersOf2
185+```
186+-}
106drop : Int -> Stream a -> Stream a
187drop : Int -> Stream a -> Stream a
107drop n xs = snd <| splitAt n xs
188drop n xs = snd <| splitAt n xs
108
189
109−{-| Combination of take and drop.
190+{-| Combination of `take` and `drop`
110
191
192+```haskell
111− splitAt n xs == (take n xs, drop n xs)
193+splitAt n xs == (take n xs, drop n xs)
194+```
112-}
195-}
113splitAt : Int -> Stream a -> ([a], Stream a)
196splitAt : Int -> Stream a -> ([a], Stream a)
114splitAt n xs = case n of
197splitAt n xs = case n of
@@ -117,9 +200,76 @@ splitAt n xs = case n of
117 in (head xs :: heads, end)
200 in (head xs :: heads, end)
118
201
119{-| Turn a stream into a signal of the elements of the stream,
202{-| Turn a stream into a signal of the elements of the stream,
120− advancing through the stream whenever an event in the given signal is
203+advancing through the stream whenever an event in the given signal is
121− fired.
204+fired.
122-}
205-}
123sampleOn : Signal b -> Stream a -> Signal a
206sampleOn : Signal b -> Stream a -> Signal a
124sampleOn sig str = let tails = foldp (\_ -> tail) str sig in
207sampleOn sig str = let tails = foldp (\_ -> tail) str sig in
125 head <~ tails
208 head <~ tails
209+
210+{-| Filter the elements of a Stream according to a predicate.
211+
212+```haskell
213+-- 1, 3, 5, 7, ...
214+filter isOdd naturals
215+
216+-- Bad! Infinite loop!
217+filter isOdd twos
218+```
219+
220+This can infinite loop if no more elements in the stream satisfy the predicate!
221+-}
222+filter : (a -> Bool) -> Stream a -> Stream a
223+filter pred xs = cons' <| (\() ->
224+ let (hd, tl) = unS xs in
225+ case pred hd of
226+ True -> (hd, filter pred tl)
227+ False -> unS <| filter pred tl)
228+
229+{-| Take values from the stream for as long as the predicate holds.
230+This can infinite loop if all elements of the stream satisfy the predicate!
231+
232+```haskell
233+takeWhile (\n -> n < 10) powersOf2 == [2,4,8]
234+
235+-- Bad! Infinite loop!
236+takeWhile isEven powersOf2
237+```
238+
239+This can infinite loop if all elements of the stream satisfy the predicate!
240+-}
241+takeWhile : (a -> Bool) -> Stream a -> [a]
242+takeWhile pred xs = fst <| splitWith pred xs
243+
244+{-| Drop values from the stream as long as the predicate holds.
245+
246+```haskell
247+-- 16, 32, 64, 128, ...
248+dropWhile (\n -> n < 10) powersOf2
249+
250+-- Bad! Infinite loop!
251+dropWhile isEven powersOf2
252+```
253+
254+This can infinite loop if all elements of the stream satisfy the predicate!
255+-}
256+dropWhile : (a -> Bool) -> Stream a -> Stream a
257+dropWhile pred xs = snd <| splitWith pred xs
258+
259+{-| Combination of `takeWhile` and `dropWhile`. Split a stream when
260+the predicate no longer holds.
261+
262+```haskell
263+splitWith pred xs == (takeWhile pred xs, dropWhile pred xs)
264+
265+splitWith (\n -> n < 10) powersOf2 == ([2,4,8], ...)
266+```
267+
268+This can infinite loop if all elements satisfy the predicate!
269+-}
270+splitWith : (a -> Bool) -> Stream a -> ([a], Stream a)
271+splitWith pred xs = let (hd, tl) = unS xs in
272+ case pred hd of
273+ True -> let (taken, dropped) = splitWith pred tl
274+ in (hd :: taken, dropped)
275+ False -> ([], xs)
libraries/List.elm+1−1
@@ -243,7 +243,7 @@ chuck = { name="Chuck", height=1.76 }
243sortBy .name [chuck,alice,bob] == [alice,bob,chuck]
243sortBy .name [chuck,alice,bob] == [alice,bob,chuck]
244sortBy .height [chuck,alice,bob] == [alice,chuck,bob]
244sortBy .height [chuck,alice,bob] == [alice,chuck,bob]
245
245
246−sortBy String.length ["five","hi"] == ["hi","five"]
246+sortBy String.length ["mouse","cat"] == ["cat","mouse"]
247```
247```
248-}
248-}
249sortBy : (a -> comparable) -> [a] -> [a]
249sortBy : (a -> comparable) -> [a] -> [a]
libraries/Native/Signal/Keyboard.js+1−1
@@ -105,7 +105,7 @@ Elm.Native.Keyboard.make = function(elm) {
105
105
106 function is(key) { return keySignal(NList.member(key)); }
106 function is(key) { return keySignal(NList.member(key)); }
107
107
108− var lastPressed = Signal.dropRepeats(downEvents);
108+ var lastPressed = downEvents;
109
109
110 return elm.Native.Keyboard.values = {
110 return elm.Native.Keyboard.values = {
111 isDown:is,
111 isDown:is,
libraries/Native/Text.js+1−9
@@ -107,15 +107,7 @@ Elm.Native.Text.make = function(elm) {
107 ctor:'RawHtml',
107 ctor:'RawHtml',
108 html: text,
108 html: text,
109 guid: guid,
109 guid: guid,
110− args: Array.prototype.slice.call(arguments, 2).map(function(arg) {
110+ args: [],
111− if (arg.props && arg.element) {
112− arg.isElement = true;
113− return arg;
114− } else if (!arg.isText) {
115− return Utils.txt('<code>' + show(arg) + '</code>');
116− }
117− return arg;
118− }),
119 };
111 };
120 var pos = A2(Utils.htmlHeight, 0, raw);
112 var pos = A2(Utils.htmlHeight, 0, raw);
121 return A3(Element.newElement, pos._0, pos._1, raw);
113 return A3(Element.newElement, pos._0, pos._1, raw);