Skip to content

Remove purescript-generics, upgrade dependencies #76

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
/node_modules/
/output/
site/psc.js
package-lock.json
5 changes: 0 additions & 5 deletions src/CSS/Animation.purs
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,12 @@ import CSS.Stylesheet (CSS, key)
import CSS.Time (Time)
import CSS.Transition (TimingFunction)
import Data.Foldable (for_)
import Data.Generic.Rep (class Generic)
import Data.Tuple.Nested (tuple7)

newtype AnimationDirection = AnimationDirection Value

derive instance eqAnimationDirection :: Eq AnimationDirection
derive instance ordAnimationDirection :: Ord AnimationDirection
derive instance genericAnimationDirection :: Generic AnimationDirection _

instance valAnimationDirection :: Val AnimationDirection where
value (AnimationDirection v) = v
Expand All @@ -35,7 +33,6 @@ newtype IterationCount = IterationCount Value

derive instance eqIterationCount :: Eq IterationCount
derive instance ordIterationCount :: Ord IterationCount
derive instance genericIterationCount :: Generic IterationCount _

instance valIterationCount :: Val IterationCount where
value (IterationCount v) = v
Expand All @@ -50,7 +47,6 @@ newtype FillMode = FillMode Value

derive instance eqFillMode :: Eq FillMode
derive instance ordFillMode :: Ord FillMode
derive instance genericFillMode :: Generic FillMode _

instance valFillMode :: Val FillMode where
value (FillMode v) = v
Expand All @@ -77,7 +73,6 @@ newtype AnimationName = AnimationName Value

derive instance eqAnimationName :: Eq AnimationName
derive instance ordAnimationName :: Ord AnimationName
derive instance genericAnimationName :: Generic AnimationName _

instance valAnimationName :: Val AnimationName where
value (AnimationName v) = v
Expand Down
11 changes: 0 additions & 11 deletions src/CSS/Background.purs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ where

import Prelude

import Data.Generic.Rep (class Generic)
import Data.Tuple (Tuple(..))

import CSS.Box (BoxType)
Expand Down Expand Up @@ -135,7 +134,6 @@ newtype BackgroundPosition = BackgroundPosition Value

derive instance eqBackgroundPosition :: Eq BackgroundPosition
derive instance ordBackgroundPosition :: Ord BackgroundPosition
derive instance genericBackgroundPosition :: Generic BackgroundPosition _

instance isStringBackgroundPosition :: IsString BackgroundPosition where
fromString = BackgroundPosition <<< fromString
Expand Down Expand Up @@ -167,7 +165,6 @@ newtype BackgroundSize = BackgroundSize Value

derive instance eqBackgroundSize :: Eq BackgroundSize
derive instance ordBackgroundSize :: Ord BackgroundSize
derive instance genericBackgroundSize :: Generic BackgroundSize _

instance isStringBackgroundSize :: IsString BackgroundSize where
fromString = BackgroundSize <<< fromString
Expand Down Expand Up @@ -205,7 +202,6 @@ newtype BackgroundRepeat = BackgroundRepeat Value

derive instance eqBackgroundRepeat :: Eq BackgroundRepeat
derive instance ordBackgroundRepeat :: Ord BackgroundRepeat
derive instance genericBackgroundRepeat :: Generic BackgroundRepeat _

instance isStringBackgroundRepeat :: IsString BackgroundRepeat where
fromString = BackgroundRepeat <<< fromString
Expand Down Expand Up @@ -255,7 +251,6 @@ newtype BackgroundImage = BackgroundImage Value

derive instance eqBackgroundImage :: Eq BackgroundImage
derive instance ordBackgroundImage :: Ord BackgroundImage
derive instance genericBackgroundImage :: Generic BackgroundImage _

instance isStringBackgroundImage :: IsString BackgroundImage where
fromString = BackgroundImage <<< fromString
Expand Down Expand Up @@ -287,7 +282,6 @@ newtype BackgroundOrigin = BackgroundOrigin Value

derive instance eqBackgroundOrigin :: Eq BackgroundOrigin
derive instance ordBackgroundOrigin :: Ord BackgroundOrigin
derive instance genericBackgroundOrigin :: Generic BackgroundOrigin _

instance isStringBackgroundOrigin :: IsString BackgroundOrigin where
fromString = BackgroundOrigin <<< fromString
Expand Down Expand Up @@ -316,7 +310,6 @@ newtype BackgroundClip = BackgroundClip Value

derive instance eqBackgroundClip :: Eq BackgroundClip
derive instance ordBackgroundClip :: Ord BackgroundClip
derive instance genericBackgroundClip :: Generic BackgroundClip _

instance isStringBackgroundClip :: IsString BackgroundClip where
fromString = BackgroundClip <<< fromString
Expand Down Expand Up @@ -345,7 +338,6 @@ newtype BackgroundAttachment = BackgroundAttachment Value

derive instance eqBackgroundAttachment :: Eq BackgroundAttachment
derive instance ordBackgroundAttachment :: Ord BackgroundAttachment
derive instance genericBackgroundAttachment :: Generic BackgroundAttachment _

instance isStringBackgroundAttachment :: IsString BackgroundAttachment where
fromString = BackgroundAttachment <<< fromString
Expand Down Expand Up @@ -377,7 +369,6 @@ newtype Side = Side Value

derive instance eqSide :: Eq Side
derive instance ordSide :: Ord Side
derive instance genericSide :: Generic Side _

instance isStringSide :: IsString Side where
fromString = Side <<< fromString
Expand Down Expand Up @@ -418,7 +409,6 @@ newtype Direction = Direction Value

derive instance eqDirection :: Eq Direction
derive instance ordDirection :: Ord Direction
derive instance genericDirection :: Generic Direction _

instance valDirection :: Val Direction where
value (Direction v) = v
Expand All @@ -436,7 +426,6 @@ newtype Location = Location Value

derive instance eqLocation :: Eq Location
derive instance ordLocation :: Ord Location
derive instance genericLocation :: Generic Location _

instance valLocation :: Val Location where
value (Location v) = v
Expand Down
2 changes: 0 additions & 2 deletions src/CSS/Border.purs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ module CSS.Border where

import Prelude

import Data.Generic.Rep (class Generic)
import Data.Tuple.Nested (tuple3, tuple4)

import CSS.Color (Color)
Expand All @@ -15,7 +14,6 @@ newtype Stroke = Stroke Value

derive instance eqStroke :: Eq Stroke
derive instance ordStroke :: Ord Stroke
derive instance genericStroke :: Generic Stroke _

instance valStroke :: Val Stroke where
value (Stroke v) = v
Expand Down
3 changes: 0 additions & 3 deletions src/CSS/Box.purs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ where

import Prelude

import Data.Generic.Rep (class Generic)

import CSS.Border (Stroke)
import CSS.Color (Color)
import CSS.Common (class Inherit, browsers)
Expand All @@ -25,7 +23,6 @@ newtype BoxType = BoxType Value

derive instance eqBoxType :: Eq BoxType
derive instance ordBoxType :: Ord BoxType
derive instance genericBoxType :: Generic BoxType _

instance isStringBoxType :: IsString BoxType where
fromString = BoxType <<< fromString
Expand Down
18 changes: 10 additions & 8 deletions src/CSS/Display.purs
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,11 @@ import CSS.Common (class Inherit, class None)
import CSS.Property (class Val, Value)
import CSS.String (fromString)
import CSS.Stylesheet (CSS, key)
import Data.Generic.Rep (class Generic)
import Data.Generic.Rep.Show (genericShow)

newtype Position = Position Value

derive instance eqPosition :: Eq Position
derive instance ordPosition :: Ord Position
derive instance genericPosition :: Generic Position _

instance valPosition :: Val Position where
value (Position v) = v
Expand All @@ -37,7 +34,6 @@ newtype Display = Display Value

derive instance eqDisplay :: Eq Display
derive instance ordDisplay :: Ord Display
derive instance genericDisplay :: Generic Display _

instance valDisplay :: Val Display where
value (Display v) = v
Expand Down Expand Up @@ -111,10 +107,11 @@ display = key $ fromString "display"
data Float = FloatLeft | FloatRight | FloatNone

derive instance eqFloat :: Eq Float
derive instance genericFloat :: Generic Float _

instance showFloat :: Show Float where
show = genericShow
show FloatLeft = "FloatLeft"
show FloatRight = "FloatRight"
show FloatNone = "FloatNone"

instance valFloat :: Val (Float) where
value (FloatLeft) = fromString "left"
Expand Down Expand Up @@ -143,10 +140,15 @@ data ClearFloat
| ClearFloatInlineEnd

derive instance eqClearFloat :: Eq ClearFloat
derive instance genericClearFloat :: Generic ClearFloat _

instance showClearFloat :: Show ClearFloat where
show = genericShow
show ClearFloatLeft = "ClearFloatLeft"
show ClearFloatRight = "ClearFloatRight"
show ClearFloatBoth = "ClearFloatBoth"
show ClearFloatNone = "ClearFloatNone"
show ClearFloatInherit = "ClearFloatInherit"
show ClearFloatInlineStart = "ClearFloatInlineStart"
show ClearFloatInlineEnd = "ClearFloatInlineEnd"

instance valClearFloat :: Val (ClearFloat) where
value (ClearFloatLeft) = fromString "left"
Expand Down
8 changes: 0 additions & 8 deletions src/CSS/Flexbox.purs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ module CSS.Flexbox where

import Prelude

import Data.Generic.Rep (class Generic)

import CSS.Common (class Center, class Inherit, class Other, class Baseline, class Auto)
import CSS.Property (class Val, Value, value, (!))
import CSS.Size (Size)
Expand Down Expand Up @@ -48,7 +46,6 @@ newtype AlignContentValue = AlignContentValue Value

derive instance eqAlignContentValue :: Eq AlignContentValue
derive instance ordAlignContentValue :: Ord AlignContentValue
derive instance genericAlignContentValue :: Generic AlignContentValue _

instance isStringAlignContentValue :: IsString AlignContentValue where
fromString = AlignContentValue <<< fromString
Expand Down Expand Up @@ -89,7 +86,6 @@ newtype AlignItemsValue = AlignItemsValue Value

derive instance eqAlignItemsValue :: Eq AlignItemsValue
derive instance ordAlignItemsValue :: Ord AlignItemsValue
derive instance genericAlignItemsValue :: Generic AlignItemsValue _

instance isStringAlignItemsValue :: IsString AlignItemsValue where
fromString = AlignItemsValue <<< fromString
Expand Down Expand Up @@ -127,7 +123,6 @@ newtype AlignSelfValue = AlignSelfValue Value

derive instance eqAlignSelfValue :: Eq AlignSelfValue
derive instance ordAlignSelfValue :: Ord AlignSelfValue
derive instance genericAlignSelfValue :: Generic AlignSelfValue _

instance isStringAlignSelfValue :: IsString AlignSelfValue where
fromString = AlignSelfValue <<< fromString
Expand Down Expand Up @@ -180,7 +175,6 @@ newtype FlexDirection = FlexDirection Value

derive instance eqFlexDirection :: Eq FlexDirection
derive instance ordFlexDirection :: Ord FlexDirection
derive instance genericFlexDirection :: Generic FlexDirection _

instance valFlexDirection :: Val FlexDirection where
value (FlexDirection v) = v
Expand Down Expand Up @@ -222,7 +216,6 @@ newtype FlexWrap = FlexWrap Value

derive instance eqFlexWrap :: Eq FlexWrap
derive instance ordFlexWrap :: Ord FlexWrap
derive instance genericFlexWrap :: Generic FlexWrap _

instance valFlexWrap :: Val FlexWrap where
value (FlexWrap v) = v
Expand All @@ -248,7 +241,6 @@ newtype JustifyContentValue = JustifyContentValue Value

derive instance eqJustifyContentValue :: Eq JustifyContentValue
derive instance ordJustifyContentValue :: Ord JustifyContentValue
derive instance genericJustifyContentValue :: Generic JustifyContentValue _

instance isStringJustifyContentValue :: IsString JustifyContentValue where
fromString = JustifyContentValue <<< fromString
Expand Down
4 changes: 0 additions & 4 deletions src/CSS/Font.purs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import CSS.Property (class Val, Value, value, quote)
import CSS.Size (Size)
import CSS.String (fromString)
import CSS.Stylesheet (CSS, key)
import Data.Generic.Rep (class Generic)
import Data.NonEmpty (NonEmpty, oneOf)

color :: Color -> CSS
Expand All @@ -17,7 +16,6 @@ newtype GenericFontFamily = GenericFontFamily Value

derive instance eqGenericFontFamily :: Eq GenericFontFamily
derive instance ordGenericFontFamily :: Ord GenericFontFamily
derive instance genericGenericFontFamily :: Generic GenericFontFamily _

instance valGenericFontFamily :: Val GenericFontFamily where
value (GenericFontFamily v) = v
Expand All @@ -35,7 +33,6 @@ newtype FontWeight = FontWeight Value

derive instance eqFontWeight :: Eq FontWeight
derive instance ordFontWeight :: Ord FontWeight
derive instance genericFontWeight :: Generic FontWeight _

instance valFontWeight :: Val FontWeight where
value (FontWeight v) = v
Expand Down Expand Up @@ -71,7 +68,6 @@ newtype FontStyle = FontStyle Value

derive instance eqFontStyle :: Eq FontStyle
derive instance ordFontStyle :: Ord FontStyle
derive instance genericFontStyle :: Generic FontStyle _

instance valFontStyle :: Val FontStyle where
value (FontStyle v) = v
Expand Down
3 changes: 0 additions & 3 deletions src/CSS/FontFace.purs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ module CSS.FontFace where

import Prelude

import Data.Generic.Rep (class Generic)
import Data.Maybe (Maybe, maybe)
import Data.NonEmpty (NonEmpty)

Expand All @@ -23,7 +22,6 @@ data FontFaceFormat

derive instance eqFontFaceFormat :: Eq FontFaceFormat
derive instance ordFontFaceFormat :: Ord FontFaceFormat
derive instance genericFontFaceFormat :: Generic FontFaceFormat _

formatName :: FontFaceFormat -> String
formatName WOFF = "woff"
Expand All @@ -39,7 +37,6 @@ data FontFaceSrc

derive instance eqFontFaceSrc :: Eq FontFaceSrc
derive instance ordFontFaceSrc :: Ord FontFaceSrc
derive instance genericFontFaceSrc :: Generic FontFaceSrc _

instance valFontFaceSrc :: Val FontFaceSrc where
value (FontFaceSrcUrl u f) = fromString $ "url(" <> quote u <> ")" <> maybe "" (\f' -> " format(" <> quote (formatName f') <> ")") f
Expand Down
3 changes: 0 additions & 3 deletions src/CSS/Gradient.purs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ where

import Prelude

import Data.Generic.Rep (class Generic)
import Data.Tuple (Tuple(..))

import CSS.Background (class Loc, BackgroundImage, Direction, sideTop, straight, sideLeft)
Expand Down Expand Up @@ -89,7 +88,6 @@ newtype Radial = Radial Value

derive instance eqRadial :: Eq Radial
derive instance ordRadial :: Ord Radial
derive instance genericRadial :: Generic Radial _

instance valRadial :: Val Radial where
value (Radial v) = v
Expand All @@ -113,7 +111,6 @@ newtype Extend = Extend Value

derive instance eqExtend :: Eq Extend
derive instance ordExtend :: Ord Extend
derive instance genericExtend :: Generic Extend _

instance valExtend :: Val Extend where
value (Extend v) = v
Expand Down
11 changes: 6 additions & 5 deletions src/CSS/ListStyle/Image.purs
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,9 @@ import CSS.String (fromString)
import CSS.Stylesheet (CSS, key)
import Data.Eq (class Eq)
import Data.Function (($))
import Data.Generic.Rep (class Generic)
import Data.Generic.Rep.Show (genericShow)
import Data.Ord (class Ord)
import Data.Semigroup ((<>))
import Data.Show (class Show)
import Data.Show (class Show, show)

data ListStyleImage
= ListStyleImage String
Expand All @@ -21,10 +19,13 @@ data ListStyleImage

derive instance eqListStyleImage :: Eq ListStyleImage
derive instance ordListStyleImage :: Ord ListStyleImage
derive instance genericListStyleImage :: Generic ListStyleImage _

instance showListStyleImage :: Show ListStyleImage where
show = genericShow
show (ListStyleImage url) = "(ListStyleImage " <> show url <> ")"
show Initial = "Initial"
show Inherit = "Inherit"
show Unset = "Unset"
show None = "None"

instance valListStyleImage :: Val ListStyleImage where
value (Initial) = fromString "initial"
Expand Down
Loading