Move the `markdown` function to the text library
commit7e1d95a108dcd6b7afe35086547fcacc7fc193e4
authorEvan Czaplicki <info@elm-lang.org>
dateSun 1 Sep 2013, 16:07 (13 years ago)
parent3fe9e24
compiler/Type/Constrain/Expression.hs+1−1
@@ -138,7 +138,7 @@ constrain env (L span expr) tipe =
138138 do vars <- forM es $ \_ -> liftIO (var Flexible)
139139 let tvars = map VarN vars
140140 cs <- zipWithM (constrain env) es tvars
141− return . ex vars $ and ("Graphics.Element.markdown" <? tipe : cs)
141+ return . ex vars $ and ("Text.markdown" <? tipe : cs)
142142
143143 Let defs body ->
144144 do c <- constrain env body tipe
libraries/Graphics/Element.elm−3
@@ -117,9 +117,6 @@ tiledImage : Int -> Int -> String -> Element
117117tiledImage w h src =
118118 newElement w h (Image Tiled w h (JS.fromString src))
119119
120−markdown : Element
121−markdown = Native.Utils.undefined
122−
123120data Three = P | Z | N
124121data Pos = Absolute Int | Relative Float
125122type Position = { horizontal : Three, vertical : Three, x : Pos, y : Pos }
libraries/Text.elm+4
@@ -80,6 +80,10 @@ text = Native.Text.text
8080plainText : String -> Element
8181plainText = Native.Text.plainText
8282
83+-- for internal use only
84+markdown : Element
85+markdown = Native.Text.markdown
86+
8387-- Convert anything to it's textual representation and make it displayable in browser
8488--
8589-- asText == text . monospace . show