Skip to content

Commit

Permalink
Remove pretty dependency, use cssNumberText
Browse files Browse the repository at this point in the history
  • Loading branch information
ddssff committed Nov 13, 2023
1 parent 70f2947 commit 20545cc
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 9 deletions.
4 changes: 1 addition & 3 deletions clay.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ Library
Build-Depends:
base >= 4.11 && < 4.18,
mtl >= 1,
pretty >= 1,
text >= 0.11
GHC-Options: -Wall -Wcompat
Default-Language: Haskell2010
Expand All @@ -94,7 +93,6 @@ Test-Suite Test-Clay
mtl >= 1,
text >= 0.11,
hspec >= 2.2.0,
hspec-discover >= 2.2.0,
pretty >= 1
hspec-discover >= 2.2.0
GHC-Options: -Wall -Wcompat
Default-Language: Haskell2010
4 changes: 0 additions & 4 deletions src/Clay/Property.hs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import Data.List.NonEmpty (NonEmpty, toList)
import Data.Maybe
import Data.String
import Data.Text (Text, replace)
import Text.PrettyPrint.HughesPJClass (Pretty(pPrint), text)

data Prefixed = Prefixed { unPrefixed :: [(Text, Text)] } | Plain { unPlain :: Text }
deriving (Show, Eq)
Expand Down Expand Up @@ -103,9 +102,6 @@ intercalate s (x:xs) = foldl (\a b -> a `mappend` s `mappend` b) x xs
newtype Number = Number { unNumber :: Fixed E5 }
deriving (Enum, Eq, Fractional, Num, Ord, Read, Real, RealFrac, Show)

instance Pretty Number where
pPrint = text . showFixed True . unNumber

instance Val Number where
value = Value . Plain . cssNumberText

Expand Down
3 changes: 1 addition & 2 deletions src/Clay/Render.hs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import Data.Maybe
import Data.Text (Text, pack)

Check warning on line 19 in src/Clay/Render.hs

View workflow job for this annotation

GitHub Actions / Haskell GHC 8.4.4 cabal

The import of ‘pack’ from module ‘Data.Text’ is redundant

Check warning on line 19 in src/Clay/Render.hs

View workflow job for this annotation

GitHub Actions / Haskell GHC 8.4.4 cabal

The import of ‘pack’ from module ‘Data.Text’ is redundant

Check warning on line 19 in src/Clay/Render.hs

View workflow job for this annotation

GitHub Actions / Haskell GHC 9.2.2 cabal

The import of ‘pack’ from module ‘Data.Text’ is redundant

Check warning on line 19 in src/Clay/Render.hs

View workflow job for this annotation

GitHub Actions / Haskell GHC 9.2.2 cabal

The import of ‘pack’ from module ‘Data.Text’ is redundant

Check warning on line 19 in src/Clay/Render.hs

View workflow job for this annotation

GitHub Actions / Haskell GHC 8.6.5 cabal

The import of ‘pack’ from module ‘Data.Text’ is redundant

Check warning on line 19 in src/Clay/Render.hs

View workflow job for this annotation

GitHub Actions / Haskell GHC 8.6.5 cabal

The import of ‘pack’ from module ‘Data.Text’ is redundant

Check warning on line 19 in src/Clay/Render.hs

View workflow job for this annotation

GitHub Actions / Haskell GHC 9.0.2 cabal

The import of ‘pack’ from module ‘Data.Text’ is redundant

Check warning on line 19 in src/Clay/Render.hs

View workflow job for this annotation

GitHub Actions / Haskell GHC 9.0.2 cabal

The import of ‘pack’ from module ‘Data.Text’ is redundant

Check warning on line 19 in src/Clay/Render.hs

View workflow job for this annotation

GitHub Actions / Haskell GHC 8.8.4 cabal

The import of ‘pack’ from module ‘Data.Text’ is redundant

Check warning on line 19 in src/Clay/Render.hs

View workflow job for this annotation

GitHub Actions / Haskell GHC 8.8.4 cabal

The import of ‘pack’ from module ‘Data.Text’ is redundant

Check warning on line 19 in src/Clay/Render.hs

View workflow job for this annotation

GitHub Actions / Haskell GHC 9.4.2 cabal

The import of ‘pack’ from module ‘Data.Text’ is redundant

Check warning on line 19 in src/Clay/Render.hs

View workflow job for this annotation

GitHub Actions / Haskell GHC 9.4.2 cabal

The import of ‘pack’ from module ‘Data.Text’ is redundant

Check warning on line 19 in src/Clay/Render.hs

View workflow job for this annotation

GitHub Actions / Haskell GHC 8.10.7 cabal

The import of ‘pack’ from module ‘Data.Text’ is redundant

Check warning on line 19 in src/Clay/Render.hs

View workflow job for this annotation

GitHub Actions / Haskell GHC 8.10.7 cabal

The import of ‘pack’ from module ‘Data.Text’ is redundant
import Data.Text.Lazy.Builder
import Prelude hiding ((**))
import Text.PrettyPrint.HughesPJClass (pPrint)

import qualified Data.Text as Text
import qualified Data.Text.Lazy as Lazy
Expand Down Expand Up @@ -151,7 +150,7 @@ kframe cfg (Keyframes ident xs) =
frame :: Config -> (Number, [Rule]) -> Builder
frame cfg (p, rs) =
mconcat
[ fromText (pack (show (pPrint p)))
[ fromText (cssNumberText p)
, "% "
, rules cfg [] rs
]
Expand Down

0 comments on commit 20545cc

Please sign in to comment.