diff --git a/.gitignore b/.gitignore index ce25bb8..5bf1410 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ /generated-docs/ /.psc* /.psa* +/.spago/ \ No newline at end of file diff --git a/bower.json b/bower.json deleted file mode 100644 index 3e5d69d..0000000 --- a/bower.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "purescript-lenses", - "ignore": [ - "**/.*", - "node_modules", - "bower_components", - "output" - ], - "dependencies": { - "purescript-prelude": "^4.0.1", - "purescript-console": "^4.1.0", - "purescript-effect": "^2.0.0", - "purescript-profunctor-lenses": "^4.0.0", - "purescript-colors": "^5.0.0", - "purescript-random": "^4.0.0", - "purescript-record-extra": "^1.0.0", - "purescript-foreign-object": "^1.0.0", - "purescript-generics-rep": "^6.0.0" - }, - "devDependencies": { - "purescript-psci-support": "^4.0.0" - } -} diff --git a/packages.dhall b/packages.dhall new file mode 100644 index 0000000..7596fd2 --- /dev/null +++ b/packages.dhall @@ -0,0 +1,5 @@ +let upstream = + https://github.com/purescript/package-sets/releases/download/psc-0.15.4-20221211/packages.dhall + sha256:d115f153861ffe27fafa4afa1d337d4fc5ae4969eee3427179b1b94ce3afa9b5 + +in upstream diff --git a/spago.dhall b/spago.dhall new file mode 100644 index 0000000..c06e600 --- /dev/null +++ b/spago.dhall @@ -0,0 +1,20 @@ +{ name = "lenses" +, dependencies = + [ "arrays" + , "colors" + , "console" + , "effect" + , "either" + , "foldable-traversable" + , "integers" + , "maybe" + , "ordered-collections" + , "prelude" + , "profunctor" + , "profunctor-lenses" + , "tuples" + , "unfoldable" + ] +, packages = ./packages.dhall +, sources = [ "src/**/*.purs", "test/**/*.purs" ] +} diff --git a/src/SumType.purs b/src/SumType.purs index 9a06d0c..53e5993 100644 --- a/src/SumType.purs +++ b/src/SumType.purs @@ -23,10 +23,9 @@ import Color (Color) import Color as Color import Data.Generic.Rep (class Generic) -import Data.Generic.Rep.Eq as GEq -import Data.Generic.Rep.Show as GShow import Data.Maybe (Maybe(..), maybe) import Data.Either (Either(..)) +import Data.Show.Generic (genericShow) import Data.Tuple (Tuple) import Data.Traversable (class Traversable) @@ -256,21 +255,18 @@ _hslaSolid = prism' constructor focuser -- ... although Eq is only required for `only`. derive instance genericPercent :: Generic Percent _ -instance eqPercent :: Eq Percent where - eq = GEq.genericEq +derive instance eqPercent :: Eq Percent instance showPercent :: Show Percent where show (Percent f) = "(" <> show f <> "%)" derive instance genericPoint :: Generic Point _ -instance eqPoint :: Eq Point where - eq = GEq.genericEq +derive instance eqPoint :: Eq Point instance showPoint :: Show Point where show (Point x y) = "(" <> show x <> ", " <> show y <> ")" derive instance genericFill :: Generic Fill _ -instance eqFill :: Eq Fill where - eq = GEq.genericEq +derive instance eqFill :: Eq Fill instance showFill :: Show Fill where - show x = GShow.genericShow x + show x = genericShow x diff --git a/test/Main.purs b/test/Main.purs new file mode 100644 index 0000000..f91f98c --- /dev/null +++ b/test/Main.purs @@ -0,0 +1,11 @@ +module Test.Main where + +import Prelude + +import Effect (Effect) +import Effect.Class.Console (log) + +main :: Effect Unit +main = do + log "🍝" + log "You should add some tests."