on master help sign in
Get rid of Graphics module prefix.
commitcb125673f846a8ed33d0327a6753dfe0c2ab4ce8 authorevancz <info@elm-lang.org> dateMon 22 Oct 2012, 00:17 (14 years ago) parent38e9b8d
2 files changed+7−8
elm/src/Types/Constrain.hs+1−2 elm/src/Types/Hints.hs+6−6
elm/src/Types/Constrain.hs+1−2
@@ -53,8 +53,7 @@ constrain typeHints (Module _ _ imports stmts) = do
5353 let escapees = Map.keys $ Map.difference assumptions allHints
5454 return . Right . (,) escapees $ cs ++ Set.toList (Set.unions css)
5555 where extraImports =
56− map (\n -> (n, Hiding []))
57− ["List","Signal","Graphics.Text","Graphics.Element","Graphics.Color"]
56+ map (\n -> (n, Hiding [])) ["List","Signal","Text","Graphics","Color"]
5857 insert as n = do v <- guid; return $ Map.insertWith' (\_ x -> x) n [v] as
5958
6059gen :: Expr -> GuidCounter (Map.Map String [X], Set.Set (Context String Constraint), Type)
elm/src/Types/Hints.hs+6−6
@@ -15,10 +15,10 @@ textToText = [ "header", "italic", "bold", "underline"
1515 , "overline", "strikeThrough", "monospace" ]
1616
1717textAttrs = [ "toText" -: string ==> text
18− , "Graphics.Text.typeface" -: string ==> text ==> text
19− , "Graphics.Text.link" -:: string ==> text ==> text
20− , numScheme (\t -> t ==> text ==> text) "Graphics.Text.height"
21− ] ++ prefix "Graphics.Text" (hasType (text ==> text) textToText)
18+ , "Text.typeface" -: string ==> text ==> text
19+ , "Text.link" -:: string ==> text ==> text
20+ , numScheme (\t -> t ==> text ==> text) "Text.height"
21+ ] ++ prefix "Text" (hasType (text ==> text) textToText)
2222
2323elements =
2424 let iee = int ==> element ==> element in
@@ -77,9 +77,9 @@ collages = [ numScheme (\n -> pairOf n ==> element ==> form) "toForm"
7777 , numScheme (\n -> pairOf n ==> form ==> bool) "isWithin"
7878 ]
7979
80−graphicsElement = prefix "Graphics.Element"
80+graphicsElement = prefix "Graphics"
8181 (concat [elements,directions,positions,lineTypes,shapes,collages])
82−graphicsColor = prefix "Graphics.Color" clrs
82+graphicsColor = prefix "Color" clrs
8383 where clrs = [ numScheme (\n -> n ==> n ==> n ==> color) "rgb"
8484 , numScheme (\n -> n ==> n ==> n ==> n ==> color) "rgba"
8585 ] ++ hasType color ["red","green","blue","black","white"