Get rid of Graphics module prefix.

This commit is contained in:
evancz 2012-10-22 00:17:18 -07:00
parent 38e9b8d382
commit cb125673f8
2 changed files with 7 additions and 8 deletions

View file

@ -53,8 +53,7 @@ constrain typeHints (Module _ _ imports stmts) = do
let escapees = Map.keys $ Map.difference assumptions allHints
return . Right . (,) escapees $ cs ++ Set.toList (Set.unions css)
where extraImports =
map (\n -> (n, Hiding []))
["List","Signal","Graphics.Text","Graphics.Element","Graphics.Color"]
map (\n -> (n, Hiding [])) ["List","Signal","Text","Graphics","Color"]
insert as n = do v <- guid; return $ Map.insertWith' (\_ x -> x) n [v] as
gen :: Expr -> GuidCounter (Map.Map String [X], Set.Set (Context String Constraint), Type)

View file

@ -15,10 +15,10 @@ textToText = [ "header", "italic", "bold", "underline"
, "overline", "strikeThrough", "monospace" ]
textAttrs = [ "toText" -: string ==> text
, "Graphics.Text.typeface" -: string ==> text ==> text
, "Graphics.Text.link" -:: string ==> text ==> text
, numScheme (\t -> t ==> text ==> text) "Graphics.Text.height"
] ++ prefix "Graphics.Text" (hasType (text ==> text) textToText)
, "Text.typeface" -: string ==> text ==> text
, "Text.link" -:: string ==> text ==> text
, numScheme (\t -> t ==> text ==> text) "Text.height"
] ++ prefix "Text" (hasType (text ==> text) textToText)
elements =
let iee = int ==> element ==> element in
@ -77,9 +77,9 @@ collages = [ numScheme (\n -> pairOf n ==> element ==> form) "toForm"
, numScheme (\n -> pairOf n ==> form ==> bool) "isWithin"
]
graphicsElement = prefix "Graphics.Element"
graphicsElement = prefix "Graphics"
(concat [elements,directions,positions,lineTypes,shapes,collages])
graphicsColor = prefix "Graphics.Color" clrs
graphicsColor = prefix "Color" clrs
where clrs = [ numScheme (\n -> n ==> n ==> n ==> color) "rgb"
, numScheme (\n -> n ==> n ==> n ==> n ==> color) "rgba"
] ++ hasType color ["red","green","blue","black","white"