packages feed

language-css 0.0.2 → 0.0.3

raw patch · 3 files changed

+23/−23 lines, 3 files

Files

language-css.cabal view
@@ -1,5 +1,5 @@ Name:          language-css-Version:       0.0.2+Version:       0.0.3 Cabal-Version: >= 1.2 License:       BSD3 License-file:  LICENSE
src/Language/Css/Build.hs view
@@ -140,7 +140,7 @@ infixl 5 /-, />, /+ infixl 6 /#, /., !, /: -infix  0 <:>+infixr 0 <:>  -- | 'RuleSet' constructor type Sel' = [Decl] -> RuleSet
src/Language/Css/Pretty.hs view
@@ -119,7 +119,7 @@  instance Pretty SubSel where 	pretty x = case x of-		    AttrSel a         -> brackets $ text $ show a+		    AttrSel a         -> brackets $ pretty a 		    ClassSel v        -> char '.' <> text v 		    IdSel v           -> char '#' <> text v 		    PseudoSel v       -> char ':' <> pretty v@@ -154,7 +154,7 @@         VPt a -> pretty a         VDouble a -> double a         VPercentage a -> pretty a-        VString a -> text $ show a+        VString a -> doubleQuotes $ text a         VMs a -> pretty a         VS a -> pretty a         VUri a -> pretty a@@ -169,7 +169,7 @@                 SpaceSep x e -> pretty x <+> space <+> pretty e  instance Pretty Func where-    pretty (Func name arg) = text (show name) <+> parens (pretty arg)+    pretty (Func name arg) = pretty name <> parens (pretty arg)   instance Pretty Ident where@@ -179,61 +179,61 @@ -- Value elems  instance Pretty Deg where-    pretty (Deg x) = (text $ show x) <> text "deg"+    pretty (Deg x) = double x <> text "deg"  instance Pretty Rad where-    pretty (Rad x) = (text $ show x) <> text "rad"+    pretty (Rad x) = double x <> text "rad"  instance Pretty Grad where-    pretty (Grad x) = (text $ show x) <> text "grad"+    pretty (Grad x) = double x <> text "grad"  instance Pretty Color where     pretty x = case x of          Cword a    -> text a          Crgb r g b -> (text "rgb" <> ) $ parens $ hsep $ -                        punctuate comma $ map (text. show) [r, g, b]+                        punctuate comma $ map int [r, g, b]  instance Pretty Hz where-    pretty (Hz x) = (text $ show x) <> text "Hz"+    pretty (Hz x) = double x <> text "Hz"  instance Pretty KHz where-    pretty (KHz x) = (text $ show x) <> text "kHz"+    pretty (KHz x) = double x <> text "kHz"  instance Pretty Em where-    pretty (Em x) = (text $ show x) <> text "em"+    pretty (Em x) = double x <> text "em"  instance Pretty Ex where-    pretty (Ex x) = (text $ show x) <> text "ex"+    pretty (Ex x) = double x <> text "ex"  instance Pretty Px where-    pretty (Px x) = (text $ show x) <> text "px"+    pretty (Px x) = int x <> text "px"  instance Pretty In where-    pretty (In x) = (text $ show x) <> text "in"+    pretty (In x) = double x <> text "in"  instance Pretty Cm where-    pretty (Cm x) = (text $ show x) <> text "cm"+    pretty (Cm x) = double x <> text "cm"  instance Pretty Mm where-    pretty (Mm x) = (text $ show x) <> text "mm"+    pretty (Mm x) = double x <> text "mm"  instance Pretty Pc where-    pretty (Pc x) = (text $ show x) <> text "pc"+    pretty (Pc x) = double x <> text "pc"  instance Pretty Pt where-    pretty (Pt x) = (text $ show x) <> text "pt"+    pretty (Pt x) = int x <> text "pt"  instance Pretty Percentage where-    pretty (Percentage x) = (text $ show x) <> text "%"+    pretty (Percentage x) = double x <> text "%"  instance Pretty Ms where-    pretty (Ms x) = (text $ show x) <> text "ms"+    pretty (Ms x) = double x <> text "ms"  instance Pretty S where-    pretty (S x) = (text $ show x) <> text "s"+    pretty (S x) = double x <> text "s"  instance Pretty Uri where-    pretty (Uri x) = text "url" <> (parens $ text $ show x)+    pretty (Uri x) = text "url" <> (parens $ text x)