on master help sign in
Get rid of Graphics module prefix.
cb12567evancz
elm/src/Types/Constrain.hs+1−2
@@ -53,8 +53,7 @@ constrain typeHints (Module _ _ imports stmts) = do
53 let escapees = Map.keys $ Map.difference assumptions allHints
53 let escapees = Map.keys $ Map.difference assumptions allHints
54 return . Right . (,) escapees $ cs ++ Set.toList (Set.unions css)
54 return . Right . (,) escapees $ cs ++ Set.toList (Set.unions css)
55 where extraImports =
55 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"]
58 insert as n = do v <- guid; return $ Map.insertWith' (\_ x -> x) n [v] as
57 insert as n = do v <- guid; return $ Map.insertWith' (\_ x -> x) n [v] as
59
58
60gen :: Expr -> GuidCounter (Map.Map String [X], Set.Set (Context String Constraint), Type)
59gen :: 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"
15 , "overline", "strikeThrough", "monospace" ]
15 , "overline", "strikeThrough", "monospace" ]
16
16
17textAttrs = [ "toText" -: string ==> text
17textAttrs = [ "toText" -: string ==> text
18− , "Graphics.Text.typeface" -: string ==> text ==> text
18+ , "Text.typeface" -: string ==> text ==> text
19− , "Graphics.Text.link" -:: string ==> text ==> text
19+ , "Text.link" -:: string ==> text ==> text
20− , numScheme (\t -> t ==> text ==> text) "Graphics.Text.height"
20+ , numScheme (\t -> t ==> text ==> text) "Text.height"
21− ] ++ prefix "Graphics.Text" (hasType (text ==> text) textToText)
21+ ] ++ prefix "Text" (hasType (text ==> text) textToText)
22
22
23elements =
23elements =
24 let iee = int ==> element ==> element in
24 let iee = int ==> element ==> element in
@@ -77,9 +77,9 @@ collages = [ numScheme (\n -> pairOf n ==> element ==> form) "toForm"
77 , numScheme (\n -> pairOf n ==> form ==> bool) "isWithin"
77 , numScheme (\n -> pairOf n ==> form ==> bool) "isWithin"
78 ]
78 ]
79
79
80−graphicsElement = prefix "Graphics.Element"
80+graphicsElement = prefix "Graphics"
81 (concat [elements,directions,positions,lineTypes,shapes,collages])
81 (concat [elements,directions,positions,lineTypes,shapes,collages])
82−graphicsColor = prefix "Graphics.Color" clrs
82+graphicsColor = prefix "Color" clrs
83 where clrs = [ numScheme (\n -> n ==> n ==> n ==> color) "rgb"
83 where clrs = [ numScheme (\n -> n ==> n ==> n ==> color) "rgb"
84 , numScheme (\n -> n ==> n ==> n ==> n ==> color) "rgba"
84 , numScheme (\n -> n ==> n ==> n ==> n ==> color) "rgba"
85 ] ++ hasType color ["red","green","blue","black","white"
85 ] ++ hasType color ["red","green","blue","black","white"